FreeBSD Bugzilla – Attachment 206330 Details for
Bug 239693
[patch] arm/axp81x: Switch to iicdev_readfrom/writeto
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
axp81x patch
axp81x.patch (text/plain), 1.14 KB, created by
Chuhong Yuan
on 2019-08-07 12:27:35 UTC
(
hide
)
Description:
axp81x patch
Filename:
MIME Type:
Creator:
Chuhong Yuan
Created:
2019-08-07 12:27:35 UTC
Size:
1.14 KB
patch
obsolete
>Index: sys/arm/allwinner/axp81x.c >=================================================================== >--- sys/arm/allwinner/axp81x.c (revision 350672) >+++ sys/arm/allwinner/axp81x.c (working copy) >@@ -707,43 +707,15 @@ > static int > axp8xx_read(device_t dev, uint8_t reg, uint8_t *data, uint8_t size) > { >- struct axp8xx_softc *sc; >- struct iic_msg msg[2]; >- >- sc = device_get_softc(dev); >- >- msg[0].slave = sc->addr; >- msg[0].flags = IIC_M_WR; >- msg[0].len = 1; >- msg[0].buf = ® >- >- msg[1].slave = sc->addr; >- msg[1].flags = IIC_M_RD; >- msg[1].len = size; >- msg[1].buf = data; >- >- return (iicbus_transfer(dev, msg, 2)); >+ >+ return (iicdev_readfrom(dev, reg, data, size, IIC_INTRWAIT)); > } > > static int > axp8xx_write(device_t dev, uint8_t reg, uint8_t val) > { >- struct axp8xx_softc *sc; >- struct iic_msg msg[2]; >- >- sc = device_get_softc(dev); >- >- msg[0].slave = sc->addr; >- msg[0].flags = IIC_M_WR; >- msg[0].len = 1; >- msg[0].buf = ® >- >- msg[1].slave = sc->addr; >- msg[1].flags = IIC_M_WR; >- msg[1].len = 1; >- msg[1].buf = &val; >- >- return (iicbus_transfer(dev, msg, 2)); >+ >+ return (iicdev_writeto(dev, reg, &val, sizeof(val), IIC_INTRWAIT)); > } > > static int
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 239693
: 206330