[PATCH v4] pinctrl: aspeed: Fix ast2500 strap register write logic

2017-08-17 Thread Yong Li
On AST2500, the hardware strap register(SCU70) only accepts write ‘1’, to clear it to ‘0’, must set bits(write ‘1’) to SCU7C Signed-off-by: Yong Li <sdliy...@gmail.com> --- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 21 + drivers/pinctrl/aspeed/pinctrl-aspeed.h |

[PATCH v4] pinctrl: aspeed: Fix ast2500 strap register write logic

2017-08-17 Thread Yong Li
On AST2500, the hardware strap register(SCU70) only accepts write ‘1’, to clear it to ‘0’, must set bits(write ‘1’) to SCU7C Signed-off-by: Yong Li --- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 21 + drivers/pinctrl/aspeed/pinctrl-aspeed.h | 1 + 2 files changed, 22

Re: [PATCH v3] pinctrl: aspeed: Fix ast2500 strap register write logic

2017-08-17 Thread Yong Li
Thanks Andrew for your thoughtful input. Let me send out another version :) 2017-08-16 20:19 GMT-07:00 Andrew Jeffery <and...@aj.id.au>: > Hi Yong, > > On Wed, 2017-08-16 at 08:05 -0700, Yong Li wrote: >> Hi Andrew, >> >> Thanks for your review. I ch

Re: [PATCH v3] pinctrl: aspeed: Fix ast2500 strap register write logic

2017-08-17 Thread Yong Li
Thanks Andrew for your thoughtful input. Let me send out another version :) 2017-08-16 20:19 GMT-07:00 Andrew Jeffery : > Hi Yong, > > On Wed, 2017-08-16 at 08:05 -0700, Yong Li wrote: >> Hi Andrew, >> >> Thanks for your review. I checked the patch before I se

Re: [PATCH v3] pinctrl: aspeed: Fix ast2500 strap register write logic

2017-08-16 Thread Yong Li
Thanks, Yong 2017-08-16 6:45 GMT-07:00 Andrew Jeffery <and...@aj.id.au>: > Hi Yong, > > On Wed, 2017-08-16 at 00:21 +0800, Yong Li wrote: >> On AST2500, the hardware strap register(SCU70) only accepts write ‘1’, >> to clear it to ‘0’, must set bits(write ‘1’) to SCU7C &

Re: [PATCH v3] pinctrl: aspeed: Fix ast2500 strap register write logic

2017-08-16 Thread Yong Li
Thanks, Yong 2017-08-16 6:45 GMT-07:00 Andrew Jeffery : > Hi Yong, > > On Wed, 2017-08-16 at 00:21 +0800, Yong Li wrote: >> On AST2500, the hardware strap register(SCU70) only accepts write ‘1’, >> to clear it to ‘0’, must set bits(write ‘1’) to SCU7C >> >> Sign

[PATCH v3] pinctrl: aspeed: Fix ast2500 strap register write logic

2017-08-15 Thread Yong Li
On AST2500, the hardware strap register(SCU70) only accepts write ‘1’, to clear it to ‘0’, must set bits(write ‘1’) to SCU7C Signed-off-by: Yong Li <sdliy...@gmail.com> --- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 19 +-- drivers/pinctrl/aspeed/pinctrl-aspeed.h | 1 + 2

[PATCH v3] pinctrl: aspeed: Fix ast2500 strap register write logic

2017-08-15 Thread Yong Li
On AST2500, the hardware strap register(SCU70) only accepts write ‘1’, to clear it to ‘0’, must set bits(write ‘1’) to SCU7C Signed-off-by: Yong Li --- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 19 +-- drivers/pinctrl/aspeed/pinctrl-aspeed.h | 1 + 2 files changed, 18

[PATCH v2] pinctrl: aspeed: Fix ast2500 strap register write logic

2017-08-11 Thread Yong Li
On AST2500, the hardware strap register(SCU70) only accepts write ‘1’, to clear it to ‘0’, must set bits(write ‘1’) to SCU7C Signed-off-by: Yong Li <sdliy...@gmail.com> --- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 20 ++-- drivers/pinctrl/aspeed/pinctrl-aspeed.h | 1 + 2

[PATCH v2] pinctrl: aspeed: Fix ast2500 strap register write logic

2017-08-11 Thread Yong Li
On AST2500, the hardware strap register(SCU70) only accepts write ‘1’, to clear it to ‘0’, must set bits(write ‘1’) to SCU7C Signed-off-by: Yong Li --- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 20 ++-- drivers/pinctrl/aspeed/pinctrl-aspeed.h | 1 + 2 files changed, 19

[PATCH] pinctrl: aspeed: Fix hardware strap register write logic

2017-08-11 Thread Yong Li
The hardware strap register(SCU70) only accepts write ‘1’, to clear it to ‘0’, must set bits(write ‘1’) to SCU7C Signed-off-by: Yong Li <sdliy...@gmail.com> --- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 9 +++-- drivers/pinctrl/aspeed/pinctrl-aspeed.h | 1 + 2 files changed, 8 inse

[PATCH] pinctrl: aspeed: Fix hardware strap register write logic

2017-08-11 Thread Yong Li
The hardware strap register(SCU70) only accepts write ‘1’, to clear it to ‘0’, must set bits(write ‘1’) to SCU7C Signed-off-by: Yong Li --- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 9 +++-- drivers/pinctrl/aspeed/pinctrl-aspeed.h | 1 + 2 files changed, 8 insertions(+), 2 deletions

boot hang issue on S5PV210 with the latest kernel

2016-12-05 Thread Yong Li
Hi all, I am testing the latest kernel on my S5PV210 ARM boards. I found I have to add the kputc debug in __armv7_mmu_cache_on in boot/compressed/head.S: mov r11, r3 kputc #'x' mov r3, r11 Without the above kputc, the kernel boot hang, there is no any output on UART Any suggestions? Thanks,

boot hang issue on S5PV210 with the latest kernel

2016-12-05 Thread Yong Li
Hi all, I am testing the latest kernel on my S5PV210 ARM boards. I found I have to add the kputc debug in __armv7_mmu_cache_on in boot/compressed/head.S: mov r11, r3 kputc #'x' mov r3, r11 Without the above kputc, the kernel boot hang, there is no any output on UART Any suggestions? Thanks,

[PATCH] ARM: dts: am335x-boneblack: add i2c1 DT entry

2016-06-02 Thread Yong Li
From: Yong Li <sdliy...@gmail.com> Without this patch, I2C-1 is missing on beaglebone black boards Signed-off-by: Yong Li <sdliy...@gmail.com> --- arch/arm/boot/dts/am335x-boneblack.dts | 15 +++ 1 file changed, 15 insertions(+) diff --git a/arch/arm/boot/dts/am335x-b

[PATCH] ARM: dts: am335x-boneblack: add i2c1 DT entry

2016-06-02 Thread Yong Li
From: Yong Li Without this patch, I2C-1 is missing on beaglebone black boards Signed-off-by: Yong Li --- arch/arm/boot/dts/am335x-boneblack.dts | 15 +++ 1 file changed, 15 insertions(+) diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts

[PATCH] iio: light apds9960: Add the missing dev.parent

2016-05-05 Thread Yong Li
Without this, the iio:deviceX is missing in the /sys/bus/i2c/devices/0-0039 Signed-off-by: Yong Li <sdliy...@gmail.com> --- drivers/iio/light/apds9960.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c index 35928fb..f47cc0a

[PATCH] iio: light apds9960: Add the missing dev.parent

2016-05-05 Thread Yong Li
Without this, the iio:deviceX is missing in the /sys/bus/i2c/devices/0-0039 Signed-off-by: Yong Li --- drivers/iio/light/apds9960.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c index 35928fb..f47cc0a 100644 --- a/drivers/iio

Re: [PATCH] iio: tmp006: Set correct iio name

2016-04-26 Thread Yong Li
t; On Tue, Apr 26, 2016 at 4:14 PM, Yong Li <sdliy...@gmail.com> wrote: >> I am thinking if there is any application is using this incorrect >> name, the application should be fix too > > The rule is: "Don't break the userspace ABI". So, if we got this wrong >

Re: [PATCH] iio: tmp006: Set correct iio name

2016-04-26 Thread Yong Li
PM, Yong Li wrote: >> I am thinking if there is any application is using this incorrect >> name, the application should be fix too > > The rule is: "Don't break the userspace ABI". So, if we got this wrong > from the beginning we are stuck with this name. > > Th

Re: [PATCH] iio: tmp006: Set correct iio name

2016-04-26 Thread Yong Li
I am thinking if there is any application is using this incorrect name, the application should be fix too Thanks, Yong 2016-04-26 20:01 GMT+08:00 Lars-Peter Clausen <l...@metafoo.de>: > On 04/26/2016 01:47 PM, Yong Li wrote: >> Thanks for your mails. Just FYI, we are testing thi

Re: [PATCH] iio: tmp006: Set correct iio name

2016-04-26 Thread Yong Li
I am thinking if there is any application is using this incorrect name, the application should be fix too Thanks, Yong 2016-04-26 20:01 GMT+08:00 Lars-Peter Clausen : > On 04/26/2016 01:47 PM, Yong Li wrote: >> Thanks for your mails. Just FYI, we are testing this tmp006 sensor on >

Re: [PATCH] iio: tmp006: Set correct iio name

2016-04-26 Thread Yong Li
>> On 25/04/16 21:59, Crestez Dan Leonard wrote: >>> On 04/25/2016 10:33 PM, Jonathan Cameron wrote: >>>> On 22/04/16 04:43, Yong Li wrote: >>>>> When load the driver using the below command: >>>>> echo tmp006 0x40 > /sys/bus/i2c/devices/i

Re: [PATCH] iio: tmp006: Set correct iio name

2016-04-26 Thread Yong Li
/16 21:59, Crestez Dan Leonard wrote: >>> On 04/25/2016 10:33 PM, Jonathan Cameron wrote: >>>> On 22/04/16 04:43, Yong Li wrote: >>>>> When load the driver using the below command: >>>>> echo tmp006 0x40 > /sys/bus/i2c/devices/i2c-0/new_device >

[PATCH] iio: tmp006: Set correct iio name

2016-04-21 Thread Yong Li
When load the driver using the below command: echo tmp006 0x40 > /sys/bus/i2c/devices/i2c-0/new_device In sysfs, the i2c name is tmp006, however the iio name is 0-0040, they are inconsistent. With this patch, the iio name will be the same as the i2c device name Signed-off-by: Yong Li <

[PATCH] iio: tmp006: Set correct iio name

2016-04-21 Thread Yong Li
When load the driver using the below command: echo tmp006 0x40 > /sys/bus/i2c/devices/i2c-0/new_device In sysfs, the i2c name is tmp006, however the iio name is 0-0040, they are inconsistent. With this patch, the iio name will be the same as the i2c device name Signed-off-by: Yong

[PATCH v2] gpio: pca953x: add PCAL9535 interrupt support for Galileo Gen2

2016-04-06 Thread Yong Li
. The original patch was submitted by Josef Ahmad <josef.ah...@linux.intel.com> http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-quark/tree/recipes-kernel/linux/files/0015-Quark-GPIO-1-2-quark.patch Signed-off-by: Yong Li <yong.b...@intel.com> --- drivers/gpio/gpio-pc

[PATCH v2] gpio: pca953x: add PCAL9535 interrupt support for Galileo Gen2

2016-04-06 Thread Yong Li
. The original patch was submitted by Josef Ahmad http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-quark/tree/recipes-kernel/linux/files/0015-Quark-GPIO-1-2-quark.patch Signed-off-by: Yong Li --- drivers/gpio/gpio-pca953x.c | 42 +- 1 file changed, 41

[PATCH] gpio: pca953x: add PCAL9535 interrupt support for Galileo Gen2

2016-04-06 Thread Yong Li
. The original patch was submitted by Josef Ahmad <josef.ah...@linux.intel.com> http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-quark/tree/recipes-kernel/linux/files/0015-Quark-GPIO-1-2-quark.patch Signed-off-by: Yong Li <yong.b...@intel.com> --- drivers/gpio/gpio-pc

[PATCH] gpio: pca953x: add PCAL9535 interrupt support for Galileo Gen2

2016-04-06 Thread Yong Li
. The original patch was submitted by Josef Ahmad http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-quark/tree/recipes-kernel/linux/files/0015-Quark-GPIO-1-2-quark.patch Signed-off-by: Yong Li --- drivers/gpio/gpio-pca953x.c | 42 +- 1 file changed, 41

Re: [PATCH v2] gpio: pca953x: Use correct u16 value for register word write

2016-04-01 Thread Yong Li
Yes it is a regression. I think it should be tagged for stable too Thanks, Yong 2016-04-01 20:51 GMT+08:00 Linus Walleij <linus.wall...@linaro.org>: > On Wed, Mar 30, 2016 at 8:49 AM, Yong Li <sdliy...@gmail.com> wrote: > >> The current implementation only us

Re: [PATCH v2] gpio: pca953x: Use correct u16 value for register word write

2016-04-01 Thread Yong Li
Yes it is a regression. I think it should be tagged for stable too Thanks, Yong 2016-04-01 20:51 GMT+08:00 Linus Walleij : > On Wed, Mar 30, 2016 at 8:49 AM, Yong Li wrote: > >> The current implementation only uses the first byte in val, >> the second byte is always 0

[PATCH v2] gpio: pca953x: Use correct u16 value for register word write

2016-03-30 Thread Yong Li
The current implementation only uses the first byte in val, the second byte is always 0. Change it to use cpu_to_le16 to write the two bytes into the register Signed-off-by: Yong Li <sdliy...@gmail.com> --- drivers/gpio/gpio-pca953x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[PATCH v2] gpio: pca953x: Use correct u16 value for register word write

2016-03-30 Thread Yong Li
The current implementation only uses the first byte in val, the second byte is always 0. Change it to use cpu_to_le16 to write the two bytes into the register Signed-off-by: Yong Li --- drivers/gpio/gpio-pca953x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers

Re: [PATCH] gpio: pca953x: Use correct u16 value for register word write

2016-03-29 Thread Yong Li
Or another method is using the below to convert the u8 to u16: cpu_to_le16(get_unaligned((u16 *) val)), compared with the i2c_smbus_write_byte_data method, which one is better? Thanks, Yong 2016-03-30 10:43 GMT+08:00 Yong Li <sdliy...@gmail.com>: > If use the get_unaligned, below is

Re: [PATCH] gpio: pca953x: Use correct u16 value for register word write

2016-03-29 Thread Yong Li
Or another method is using the below to convert the u8 to u16: cpu_to_le16(get_unaligned((u16 *) val)), compared with the i2c_smbus_write_byte_data method, which one is better? Thanks, Yong 2016-03-30 10:43 GMT+08:00 Yong Li : > If use the get_unaligned, below is the code example, but we can

Re: [PATCH] gpio: pca953x: Use correct u16 value for register word write

2016-03-29 Thread Yong Li
(buf); else value = get_unaligned_le16(buf); Thanks, Yong Li 2016-03-30 0:33 GMT+08:00 Phil Reid <pr...@electromag.com.au>: > On 29/03/2016 10:39 PM, Alexander Stein wrote: >> >> You missed CC'ing Phil (Added for this post) >> >> On Tuesday 29 March 2016 20:53:

Re: [PATCH] gpio: pca953x: Use correct u16 value for register word write

2016-03-29 Thread Yong Li
(buf); else value = get_unaligned_le16(buf); Thanks, Yong Li 2016-03-30 0:33 GMT+08:00 Phil Reid : > On 29/03/2016 10:39 PM, Alexander Stein wrote: >> >> You missed CC'ing Phil (Added for this post) >> >> On Tuesday 29 March 2016 20:53:58, Yong Li wrote: >>> &g

Re: [PATCH] gpio: pca953x: Use correct u16 value for register word write

2016-03-29 Thread Yong Li
Thanks for your comment, I think I can change it to val[0] | (val[1] << 8), is it okay ? 2016-03-29 20:06 GMT+08:00 Phil Reid <pr...@electromag.com.au>: > G'day Yong, > > One comment below. > > On 29/03/2016 2:27 PM, Yong Li wrote: >> >> The current implemen

Re: [PATCH] gpio: pca953x: Use correct u16 value for register word write

2016-03-29 Thread Yong Li
Thanks for your comment, I think I can change it to val[0] | (val[1] << 8), is it okay ? 2016-03-29 20:06 GMT+08:00 Phil Reid : > G'day Yong, > > One comment below. > > On 29/03/2016 2:27 PM, Yong Li wrote: >> >> The current implementation only uses the first

[PATCH] gpio: pca953x: Use correct u16 value for register word write

2016-03-29 Thread Yong Li
The current implementation only uses the first byte in *val, the second data is always 0. Change it to *(u16 *)val to write the two bytes into the register Signed-off-by: Yong Li <sdliy...@gmail.com> --- drivers/gpio/gpio-pca953x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH] gpio: pca953x: Use correct u16 value for register word write

2016-03-29 Thread Yong Li
The current implementation only uses the first byte in *val, the second data is always 0. Change it to *(u16 *)val to write the two bytes into the register Signed-off-by: Yong Li --- drivers/gpio/gpio-pca953x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio

[PATCH] iio: dac: mcp4725: set iio name property in sysfs

2016-01-05 Thread Yong Li
Without this change, the name entity for mcp4725 is missing in /sys/bus/iio/devices/iio\:device*/name With this change, name is reported correctly Signed-off-by: Yong Li --- drivers/iio/dac/mcp4725.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iio/dac/mcp4725.c b/drivers/iio

[PATCH] iio: dac: mcp4725: set iio name property in sysfs

2016-01-05 Thread Yong Li
Without this change, the name entity for mcp4725 is missing in /sys/bus/iio/devices/iio\:device*/name With this change, name is reported correctly Signed-off-by: Yong Li <sdliy...@gmail.com> --- drivers/iio/dac/mcp4725.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/i

[PATCH] ARM: OMAP2+: allow DEBUG_UNCOMPRESS for OMAP2+

2015-12-28 Thread Yong Li
Based on the below commit ae3c99a26c60 ("ARM: 7806/1: allow DEBUG_UNCOMPRESS for Tegra"), change the .data section to .text section, to enable DEBUG_UNCOMPRESS for OMAP2+ platforms Tested okay using BeagleBone Black Signed-off-by: Yong Li --- arch/arm/Kconfig.debug | 2 +-

[PATCH] ARM: OMAP2+: allow DEBUG_UNCOMPRESS for OMAP2+

2015-12-28 Thread Yong Li
Based on the below commit ae3c99a26c60 ("ARM: 7806/1: allow DEBUG_UNCOMPRESS for Tegra"), change the .data section to .text section, to enable DEBUG_UNCOMPRESS for OMAP2+ platforms Tested okay using BeagleBone Black Signed-off-by: Yong Li <sdliy...@gmail.com> --- arch/a