[PATCH V1] leds: pca955x: Correct I2C Functionality

2017-05-22 Thread Tin Huynh
The driver checks an incorrect flag of functionality of adapter. When a driver requires i2c_smbus_read_byte_data and i2c_smbus_write_byte_data, it should check I2C_FUNC_SMBUS_BYTE_DATA instead I2C_FUNC_I2C. This patch fixes the problem. Signed-off-by: Tin Huynh --- drivers/leds/leds-pca955x.c

[PATCH V2] i2c: xgene: Set ACPI_COMPANION_I2C

2017-05-16 Thread Tin Huynh
With ACPI, i2c-core requires ACPI companion to be set in order for it to create slave device. This patch sets the ACPI companion accordingly. Signed-off-by: Tin Huynh --- drivers/i2c/busses/i2c-xgene-slimpro.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) Change from V1: - Add

[PATCH V5] i2c: designware: fix wrong Tx/Rx FIFO for ACPI

2016-12-14 Thread Tin Huynh
ACPI always sets Tx/Rx FIFO to 32. This configuration will cause problem if the IP core supports a FIFO size of less than 32. The driver should read the FIFO size from the IP and select the smaller one of the two. Signed-off-by: Tin Huynh --- drivers/i2c/busses/i2c-designware-platdrv.c | 31

[PATCH V1] i2c: xgene: Fix missing code of DTB support

2016-12-13 Thread Tin Huynh
In DTB case, i2c-core doesn't create slave device which is installed on i2c-xgene bus because of missing code in this driver. This patch fixes this issue. Signed-off-by: Tin Huynh --- drivers/i2c/busses/i2c-xgene-slimpro.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --

Re: [PATCH V4] i2c: designware: fix wrong Tx/Rx FIFO for ACPI

2016-12-13 Thread Tin Huynh
On Tue, Dec 13, 2016 at 6:25 PM, Andy Shevchenko wrote: > On Tue, 2016-12-13 at 17:03 +0700, Tin Huynh wrote: >> ACPI always sets Tx/Rx FIFO to 32. This configuration will >> cause problem if the IP core supports a FIFO size of less than 32. >> The driver should read the FIFO

[PATCH V4] i2c: designware: fix wrong Tx/Rx FIFO for ACPI

2016-12-13 Thread Tin Huynh
ACPI always sets Tx/Rx FIFO to 32. This configuration will cause problem if the IP core supports a FIFO size of less than 32. The driver should read the FIFO size from the IP and select the smaller one of the two. Signed-off-by: Tin Huynh --- drivers/i2c/busses/i2c-designware-platdrv.c | 27

[PATCH V3] i2c: designware: fix wrong tx/rx fifo for ACPI

2016-12-12 Thread Tin Huynh
ACPI always sets txfifo and rxfifo to 32. This configuration will cause problem if the IP core supports a fifo size of less than 32. The driver should read the fifo size from the IP and select the smaller one of the two. Signed-off-by: Tin Huynh --- drivers/i2c/busses/i2c-designware-platdrv.c

[PATCH V2] i2c: designware: fix wrong tx/rx fifo for ACPI

2016-12-05 Thread Tin Huynh
ACPI always sets txfifo and rxfifo to 32. This configuration will cause problem if the IP core supports a fifo size of less than 32. The driver should read the fifo size from the IP and select the smaller one of the two. Signed-off-by: Tin Huynh --- drivers/i2c/busses/i2c-designware-platdrv.c

Re: [PATCH V1] rtc: ds1307: Add ACPI support

2016-12-04 Thread Tin Huynh
On Wed, Nov 30, 2016 at 9:57 AM, Tin Huynh wrote: > > This patch enables ACPI support for rtc-ds1307 driver. > > Signed-off-by: Tin Huynh > --- > drivers/rtc/rtc-ds1307.c | 51 ++--- > 1 files changed, 43 insertions(+), 8 deletion

[PATCH V5] leds: pca955x: Add ACPI support for pca955x

2016-12-01 Thread Tin Huynh
This patch enables ACPI support for leds-pca955x driver. Signed-off-by: Tin Huynh --- drivers/leds/leds-pca955x.c | 24 ++-- 1 files changed, 22 insertions(+), 2 deletions(-) Change from V4: -Using client->name instead of id->name to avoid NULL pointer in ACPI.

[PATCH V4] leds: pca955x: Add ACPI support for pca955x

2016-11-30 Thread Tin Huynh
This patch enables ACPI support for leds-pca955x driver. Signed-off-by: Tin Huynh --- drivers/leds/leds-pca955x.c | 22 +- 1 files changed, 21 insertions(+), 1 deletions(-) Change from V3: -Drop ".id =" and ".driver_data =" from pca955x_acpi_ids i

Re: [PATCH V3] leds: pca955x: Add ACPI support for pca955x

2016-11-30 Thread Tin Huynh
On Wed, Nov 30, 2016 at 3:01 PM, Jacek Anaszewski wrote: > > On 11/30/2016 08:51 AM, Jacek Anaszewski wrote: >> >> Hi Tin, >> >> How this patch is different from the one already merged? >> >> Best regards, >> Jacek Anaszewski >> >>

[PATCH V3] leds: pca955x: Add ACPI support for pca955x

2016-11-29 Thread Tin Huynh
This patch enables ACPI support for leds-pca955x driver. Signed-off-by: Tin Huynh --- drivers/leds/leds-pca955x.c | 22 +- 1 files changed, 21 insertions(+), 1 deletions(-) Change from V2: -Correct coding conventions. Change from V1: -Remove CONFIG_ACPI. diff --git a

[PATCH V1] rtc: ds1307: Add ACPI support

2016-11-29 Thread Tin Huynh
This patch enables ACPI support for rtc-ds1307 driver. Signed-off-by: Tin Huynh --- drivers/rtc/rtc-ds1307.c | 51 ++--- 1 files changed, 43 insertions(+), 8 deletions(-) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index 4e31036

Re: [PATCH V5] i2c: mux: pca954x: Add ACPI support for pca954x

2016-11-29 Thread Tin Huynh
On Tue, Nov 29, 2016 at 5:15 PM, Peter Rosin wrote: > On 2016-11-29 11:12, Tin Huynh wrote: >> This patch enables ACPI support for mux-pca954x driver. > > Looks good, thanks! > >> Signed-off-by: Tin Huynh > > Acked-by: Peter Rosin > > Cheers, >

Re: [PATCH V2] leds: pca963x: Add ACPI support

2016-11-29 Thread Tin Huynh
On Tue, Nov 29, 2016 at 6:04 PM, Mika Westerberg wrote: > On Tue, Nov 29, 2016 at 11:55:47AM +0100, Jacek Anaszewski wrote: >> On 11/29/2016 11:21 AM, Tin Huynh wrote: >> > This patch enables ACPI support for leds-pca963x driver. >> > >> > Signed-off-by: Ti

[PATCH V2] leds: pca963x: Add ACPI support

2016-11-29 Thread Tin Huynh
This patch enables ACPI support for leds-pca963x driver. Signed-off-by: Tin Huynh --- drivers/leds/leds-pca963x.c | 25 - 1 files changed, 24 insertions(+), 1 deletions(-) Change from V1: -Add CONFIG_ACPI. diff --git a/drivers/leds/leds-pca963x.c b/drivers/leds

[PATCH V5] i2c: mux: pca954x: Add ACPI support for pca954x

2016-11-29 Thread Tin Huynh
This patch enables ACPI support for mux-pca954x driver. Signed-off-by: Tin Huynh --- drivers/i2c/muxes/i2c-mux-pca954x.c | 28 +++- 1 files changed, 27 insertions(+), 1 deletions(-) Change from V4: -Add ACPI_PTR. Change from V3: -Readd CONFIG_ACPI. Change from V2

Re: [PATCH V1] leds: pca963x: Add ACPI support

2016-11-29 Thread Tin Huynh
Hi I got a small bug when compiling without CONFIG_ACPI I will send out the patch to fix the problem later. On Tue, Nov 29, 2016 at 5:04 PM, Jacek Anaszewski wrote: > Hi Tin, > > Thanks for the update. > > On 11/29/2016 10:15 AM, Mika Westerberg wrote: >> >> Acked-by: Mika Westerberg > > > Mika,

Re: [PATCH V1] i2c: designware: fix wrong tx/rx fifo for ACPI

2016-11-29 Thread Tin Huynh
On Tue, Nov 29, 2016 at 4:26 PM, Mika Westerberg wrote: > On Tue, Nov 29, 2016 at 04:15:13PM +0700, Tin Huynh wrote: >>Yes , My IP core supports 16 bytes size only . Should we get this >>parameter from ACPI table instead of 32 ? > > What if we set the default 32 from

[PATCH V4] i2c: mux: pca954x: Add ACPI support for pca954x

2016-11-28 Thread Tin Huynh
This patch enables ACPI support for mux-pca954x driver. Signed-off-by: Tin Huynh Change from v1 : -Don't shadow id variable. -Include sorted header. -Redefine acpi_device_id. -Add CONFIG_ACPI. --- drivers/i2c/muxes/i2c-mux-pca954x.c | 27 ++- 1 files change

[PATCH V1] leds: pca963x: Add ACPI support

2016-11-28 Thread Tin Huynh
This patch enables ACPI support for leds-pca963x driver. Signed-off-by: Tin Huynh --- drivers/leds/leds-pca963x.c | 22 +- 1 files changed, 21 insertions(+), 1 deletions(-) diff --git a/drivers/leds/leds-pca963x.c b/drivers/leds/leds-pca963x.c index 407eba1..be51a12

[PATCH V1] i2c: designware: fix wrong tx/rx fifo for ACPI

2016-11-28 Thread Tin Huynh
ACPI always sets txfifo and rxfifo to 32. This configuration will cause problem if the IP core supports a fifo size of 16 bytes only. Set the default value to 0 so the driver will get these parameters from IP core. Signed-off-by: Tin Huynh --- drivers/i2c/busses/i2c-designware-platdrv.c |4

[PATCH V2] leds: pca955x: Add ACPI support for pca955x

2016-11-28 Thread Tin Huynh
This patch enables ACPI support for leds-pca955x driver. Signed-off-by: Tin Huynh --- drivers/leds/leds-pca955x.c | 22 +- 1 files changed, 21 insertions(+), 1 deletions(-) Change from V1: -Remove CONFIG_ACPI. diff --git a/drivers/leds/leds-pca955x.c b/drivers/leds/leds