FreeBSD Bugzilla – Attachment 206333 Details for
Bug 239697
[patch] arm/am335x: Switch to iicdev_readfrom/writeto
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
am335x patch
am335x.patch (text/plain), 1.09 KB, created by
Chuhong Yuan
on 2019-08-07 14:57:42 UTC
(
hide
)
Description:
am335x patch
Filename:
MIME Type:
Creator:
Chuhong Yuan
Created:
2019-08-07 14:57:42 UTC
Size:
1.09 KB
patch
obsolete
>Index: sys/arm/ti/am335x/am335x_pmic.c >=================================================================== >--- sys/arm/ti/am335x/am335x_pmic.c (revision 350672) >+++ sys/arm/ti/am335x/am335x_pmic.c (working copy) >@@ -79,30 +79,16 @@ > static int > am335x_pmic_read(device_t dev, uint8_t addr, uint8_t *data, uint8_t size) > { >- struct am335x_pmic_softc *sc = device_get_softc(dev); >- struct iic_msg msg[] = { >- { sc->sc_addr, IIC_M_WR, 1, &addr }, >- { sc->sc_addr, IIC_M_RD, size, data }, >- }; >- return (iicbus_transfer(dev, msg, 2)); >+ return (iicdev_readfrom(dev, addr, data, size, IIC_INTRWAIT)); > } > > static int > am335x_pmic_write(device_t dev, uint8_t address, uint8_t *data, uint8_t size) > { >- uint8_t buffer[MAX_IIC_DATA_SIZE + 1]; >- struct am335x_pmic_softc *sc = device_get_softc(dev); >- struct iic_msg msg[] = { >- { sc->sc_addr, IIC_M_WR, size + 1, buffer }, >- }; >- > if (size > MAX_IIC_DATA_SIZE) > return (ENOMEM); > >- buffer[0] = address; >- memcpy(buffer + 1, data, size); >- >- return (iicbus_transfer(dev, msg, 1)); >+ return (iicdev_writeto(dev, address, data, size, IIC_INTRWAIT)); > } > > static void
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 239697
: 206333