Re: [PATCH] RTC: RK808: Work around hardware bug on November 31st

2015-12-07 Thread Julius Werner
> Still, you're right that adding the GET_TIME check wouldn't hurt... at > worst it just does nothing. I'll try it out. Hmm... so it basically works (when you hack the RTC read out of the firmware), but only on reboot for some reason (which makes it way less useful). After a full power off I'm

[PATCH v2] RTC: RK808: Work around hardware bug on November 31st

2015-12-07 Thread Julius Werner
point), we read out the (adjusted) alarm time beforehand and write it (newly adjusted) back afterwards. This way, system time and alarm time will always stay on the same calendar (as long as we're able to keep track of our anchor point, at least). Signed-off-by: Julius Werner <jwer...

[PATCH] spi/spi-fsl-espi.c: Add spi cs polarity support

2015-12-06 Thread Andreas Werner
Add CS polarity flag to be able to set the CS polarity via the DT property spi-cs-high. Signed-off-by: Andreas Werner --- drivers/spi/spi-fsl-espi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c index c27124a

[PATCH] spi/spi-fsl-espi.c: Add spi cs polarity support

2015-12-06 Thread Andreas Werner
Add CS polarity flag to be able to set the CS polarity via the DT property spi-cs-high. Signed-off-by: Andreas Werner <andreas.wer...@men.de> --- drivers/spi/spi-fsl-espi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/s

Re: [PATCH] RTC: RK808: Work around hardware bug on November 31st

2015-12-04 Thread Julius Werner
> If you set the alarm > for Dec 25th and it's currently Oct 31st then you'll have to adjust in > the alarm code and you'll really set it for Dec 24th. As per above, > we're in S3 (presumably) or have some persistent kernel state so we > know to adjust everything when we wake up (even if we wake

Re: [PATCH] RTC: RK808: Work around hardware bug on November 31st

2015-12-04 Thread Julius Werner
> How would such a hook work? If userspace sees the system suspend on > Nov 30th and sees the system wake up on Dec 1st, how does it know > whether it should adjust? If it's truly Dec 1st then the kernel will > have adjusted the date from Nov 31st to Dec 1st. If it's truly Dec > 2nd then the

Re: [PATCH] RTC: RK808: Work around hardware bug on November 31st

2015-12-04 Thread Julius Werner
> If a device is in S3 for the whole day that the glitch occurs and then > we wake up then we'll end up thinking it's Dec 1st instead of Dec 2nd, > right? That case _could_ be handled by knowing that the last time we > read the clock it was before 12/1 and that this time it is after > 11/30.

[v2 2/2] ata/sata_fsl.c: add ATA_FLAG_NO_LOG_PAGE to blacklist the controller for log page reads

2015-12-04 Thread Andreas Werner
: exception Emask 0x50 SAct 0x0 SErr 0x800 action 0x6 frozen t4 [ 13.359281] ata1: SError: { HostInt } [ 13.361644] ata1: hard resetting link Signed-off-by: Andreas Werner --- drivers/ata/sata_fsl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/ata/sata_fsl.c b

[v2 1/2] libata-eh.c: Introduce new ata port flag for controller which lockup on read log page

2015-12-04 Thread Andreas Werner
Some controller lockup on a ata_read_log_page. Add new ata port flag ATA_FLAG_NO_LOG_PAGE which can used to blacklist a controller. If this flag is set, any attempt to read a log page returns an error without actually issuing the command. Signed-off-by: Andreas Werner --- drivers/ata/libata

[v2 0/2] ata/libata-eh.c: introduce ATA_FLAG_NO_LOG_PAGE

2015-12-04 Thread Andreas Werner
test robot Andreas Werner (2): libata-eh.c: Introduce new ata port flag for controller which lockup on read log page ata/sata_fsl.c: add ATA_FLAG_NO_LOG_PAGE to blacklist the controller for log page reads drivers/ata/libata-eh.c | 9 + drivers/ata/sata_fsl.c | 3 ++- include

Re:# libata: introduce ATA_FLAG_NO_LOG_PAGE

2015-12-04 Thread Andreas Werner
Hi, argh sorry send the wrong patches from a broken tree. Will send a v2 Regards Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read

[PATCH 2/2] ata/sata_fsl.c: add ATA_FLAG_NO_LOG_PAGE to blacklist the controller for log page reads

2015-12-04 Thread Andreas Werner
: exception Emask 0x50 SAct 0x0 SErr 0x800 action 0x6 frozen t4 [ 13.359281] ata1: SError: { HostInt } [ 13.361644] ata1: hard resetting link Signed-off-by: Andreas Werner --- drivers/ata/sata_fsl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/ata/sata_fsl.c b

[PATCH 1/2] libata-eh.c: Introduce new ata port flag for controller which lockup on read log page

2015-12-04 Thread Andreas Werner
Some controller lockup on a ata_read_log_page. Add new ata port flag ATA_FLAG_NO_LOG_PAGE which can used to blacklist a controller. If this flag is set, any attempt to read a log page returns an error without actually issuing the command. Signed-off-by: Andreas Werner --- drivers/ata/libata

[PATCH 0/2] libata: introduce ATA_FLAG_NO_LOG_PAGE

2015-12-04 Thread Andreas Werner
. The device failed during initialisation if the SATA device includes the devslp feature. With this patchset, we blacklist the fsl sata controller and return a error on any attempt to read a log page. This allows us to access the mSATA. Andreas Werner (2): libata-eh.c: Introduce new ata port flag

[PATCH 2/2] ata/sata_fsl.c: add ATA_FLAG_NO_LOG_PAGE to blacklist the controller for log page reads

2015-12-04 Thread Andreas Werner
: exception Emask 0x50 SAct 0x0 SErr 0x800 action 0x6 frozen t4 [ 13.359281] ata1: SError: { HostInt } [ 13.361644] ata1: hard resetting link Signed-off-by: Andreas Werner <andreas.wer...@men.de> --- drivers/ata/sata_fsl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH 1/2] libata-eh.c: Introduce new ata port flag for controller which lockup on read log page

2015-12-04 Thread Andreas Werner
Some controller lockup on a ata_read_log_page. Add new ata port flag ATA_FLAG_NO_LOG_PAGE which can used to blacklist a controller. If this flag is set, any attempt to read a log page returns an error without actually issuing the command. Signed-off-by: Andreas Werner <andreas.wer...@men

[PATCH 0/2] libata: introduce ATA_FLAG_NO_LOG_PAGE

2015-12-04 Thread Andreas Werner
. The device failed during initialisation if the SATA device includes the devslp feature. With this patchset, we blacklist the fsl sata controller and return a error on any attempt to read a log page. This allows us to access the mSATA. Andreas Werner (2): libata-eh.c: Introduce new ata port flag

[v2 2/2] ata/sata_fsl.c: add ATA_FLAG_NO_LOG_PAGE to blacklist the controller for log page reads

2015-12-04 Thread Andreas Werner
: exception Emask 0x50 SAct 0x0 SErr 0x800 action 0x6 frozen t4 [ 13.359281] ata1: SError: { HostInt } [ 13.361644] ata1: hard resetting link Signed-off-by: Andreas Werner <andreas.wer...@men.de> --- drivers/ata/sata_fsl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[v2 1/2] libata-eh.c: Introduce new ata port flag for controller which lockup on read log page

2015-12-04 Thread Andreas Werner
Some controller lockup on a ata_read_log_page. Add new ata port flag ATA_FLAG_NO_LOG_PAGE which can used to blacklist a controller. If this flag is set, any attempt to read a log page returns an error without actually issuing the command. Signed-off-by: Andreas Werner <andreas.wer...@men

[v2 0/2] ata/libata-eh.c: introduce ATA_FLAG_NO_LOG_PAGE

2015-12-04 Thread Andreas Werner
test robot Andreas Werner (2): libata-eh.c: Introduce new ata port flag for controller which lockup on read log page ata/sata_fsl.c: add ATA_FLAG_NO_LOG_PAGE to blacklist the controller for log page reads drivers/ata/libata-eh.c | 9 + drivers/ata/sata_fsl.c | 3 ++- include

Re:# libata: introduce ATA_FLAG_NO_LOG_PAGE

2015-12-04 Thread Andreas Werner
Hi, argh sorry send the wrong patches from a broken tree. Will send a v2 Regards Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read

Re: [PATCH] RTC: RK808: Work around hardware bug on November 31st

2015-12-04 Thread Julius Werner
> If a device is in S3 for the whole day that the glitch occurs and then > we wake up then we'll end up thinking it's Dec 1st instead of Dec 2nd, > right? That case _could_ be handled by knowing that the last time we > read the clock it was before 12/1 and that this time it is after > 11/30.

Re: [PATCH] RTC: RK808: Work around hardware bug on November 31st

2015-12-04 Thread Julius Werner
> How would such a hook work? If userspace sees the system suspend on > Nov 30th and sees the system wake up on Dec 1st, how does it know > whether it should adjust? If it's truly Dec 1st then the kernel will > have adjusted the date from Nov 31st to Dec 1st. If it's truly Dec > 2nd then the

Re: [PATCH] RTC: RK808: Work around hardware bug on November 31st

2015-12-04 Thread Julius Werner
> If you set the alarm > for Dec 25th and it's currently Oct 31st then you'll have to adjust in > the alarm code and you'll really set it for Dec 24th. As per above, > we're in S3 (presumably) or have some persistent kernel state so we > know to adjust everything when we wake up (even if we wake

Re: [rtc-linux] [PATCH] RTC: RK808: Work around hardware bug on November 31st

2015-12-03 Thread Julius Werner
> I would have liked to be in copy of that mail. Maybe you used > get_maintainers on an old tree? Oops, yes, sorry, I ran it on a 3.14 backport and then just added people I found in older patches for that file. > I hope reading the time properly fails thanks to the rtc_valid_tm(tm) in >

Re: libata-core: devslp fails on ATP mSATA

2015-12-03 Thread Andreas Werner
On Thu, Dec 03, 2015 at 10:15:49AM -0500, Tejun Heo wrote: > Hello, > > On Thu, Dec 03, 2015 at 10:33:55AM +0100, Andreas Werner wrote: > > All the other "flag" fields in the structs are used and/or reserved > > and it seems to be no good place for such flags.

Re: libata-core: devslp fails on ATP mSATA

2015-12-03 Thread Andreas Werner
On Wed, Dec 02, 2015 at 11:47:53AM -0500, Tejun Heo wrote: > Hello, Andreas. > > On Wed, Dec 02, 2015 at 10:33:10AM +0100, Andreas Werner wrote: > > Blacklisting the controller would be a solution yes, but I just > > wanna wait the answer from the FAE to be sure we real

Re: libata-core: devslp fails on ATP mSATA

2015-12-03 Thread Andreas Werner
On Wed, Dec 02, 2015 at 11:47:53AM -0500, Tejun Heo wrote: > Hello, Andreas. > > On Wed, Dec 02, 2015 at 10:33:10AM +0100, Andreas Werner wrote: > > Blacklisting the controller would be a solution yes, but I just > > wanna wait the answer from the FAE to be sure we real

Re: [rtc-linux] [PATCH] RTC: RK808: Work around hardware bug on November 31st

2015-12-03 Thread Julius Werner
> I would have liked to be in copy of that mail. Maybe you used > get_maintainers on an old tree? Oops, yes, sorry, I ran it on a 3.14 backport and then just added people I found in older patches for that file. > I hope reading the time properly fails thanks to the rtc_valid_tm(tm) in >

Re: libata-core: devslp fails on ATP mSATA

2015-12-03 Thread Andreas Werner
On Thu, Dec 03, 2015 at 10:15:49AM -0500, Tejun Heo wrote: > Hello, > > On Thu, Dec 03, 2015 at 10:33:55AM +0100, Andreas Werner wrote: > > All the other "flag" fields in the structs are used and/or reserved > > and it seems to be no good place for such flags.

[PATCH] RTC: RK808: Work around hardware bug on November 31st

2015-12-02 Thread Julius Werner
on the Gregorian one). Those edge cases can only really be solved by regularly syncing to an external time source (e.g. NTP). Signed-off-by: Julius Werner Reviewed-by: Chris Zhong --- drivers/rtc/rtc-rk808.c | 93 ++--- 1 file changed, 50 insertions(+), 43

Re: libata-core: devslp fails on ATP mSATA

2015-12-02 Thread Andreas Werner
On Tue, Dec 01, 2015 at 02:04:10PM -0500, Tejun Heo wrote: > On Tue, Dec 01, 2015 at 11:17:15AM -0500, Tejun Heo wrote: > > So, I suppose this is a fallout from 9faa643855df ("libata: use > > READ_LOG_DMA_EXT"). The description just says "we should try use it" > > but is there any benefit from

Re: libata-core: devslp fails on ATP mSATA

2015-12-02 Thread Andreas Werner
On Tue, Dec 01, 2015 at 02:04:10PM -0500, Tejun Heo wrote: > On Tue, Dec 01, 2015 at 11:17:15AM -0500, Tejun Heo wrote: > > So, I suppose this is a fallout from 9faa643855df ("libata: use > > READ_LOG_DMA_EXT"). The description just says "we should try use it" > > but is there any benefit from

[PATCH] RTC: RK808: Work around hardware bug on November 31st

2015-12-02 Thread Julius Werner
on the Gregorian one). Those edge cases can only really be solved by regularly syncing to an external time source (e.g. NTP). Signed-off-by: Julius Werner <jwer...@chromium.org> Reviewed-by: Chris Zhong <z...@rock-chips.com> --- drivers/rtc/rtc-

Re: libata-core: devslp fails on ATP mSATA

2015-12-01 Thread Andreas Werner
Hi, first sorry for the bad email format, but the IT decided to add my Email signature as HTML on the Exchange Server, this is why lkml rejected the email. Therefore I will switch to my private address. I do not think that the commit you mention is the root cause for this problem, because it is

Re: libata-core: devslp fails on ATP mSATA

2015-12-01 Thread Andreas Werner
Hi, first sorry for the bad email format, but the IT decided to add my Email signature as HTML on the Exchange Server, this is why lkml rejected the email. Therefore I will switch to my private address. I do not think that the commit you mention is the root cause for this problem, because it is

Re: [RFC] usb: dwc2: hcd: fix split schedule issue

2015-11-16 Thread Julius Werner
> To handle things smarter, I think I need to research how to deal with > hubs attached to hubs attached to hubs. For instance: > > dwc2 > -> multi_tt hub > -> single_tt hub > -> device 1 > -> device 2 Keep in mind that there's always at most one (active) TT between host and

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Julius Werner
Another point to note, which I think is what prevents the flow Alan suggested from working, is this little snippet in DWC2's hub_control GetPortStatus callback: if (!hsotg->flags.b.port_connect_status) { /* * The port is

Re: [RFC] usb: dwc2: hcd: fix split schedule issue

2015-11-16 Thread Julius Werner
> To handle things smarter, I think I need to research how to deal with > hubs attached to hubs attached to hubs. For instance: > > dwc2 > -> multi_tt hub > -> single_tt hub > -> device 1 > -> device 2 Keep in mind that there's always at most one (active) TT between host and

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Julius Werner
Another point to note, which I think is what prevents the flow Alan suggested from working, is this little snippet in DWC2's hub_control GetPortStatus callback: if (!hsotg->flags.b.port_connect_status) { /* * The port is

Re: [PATCH] gpio: Add driver for MEN 16Z127 GPIO controller

2015-10-08 Thread Andreas Werner
Yet another thing. if i will implement the open drain support, does it really makes sense to go with the generic gpio lib? I need to replace the direction_input and direction_outpu functions because if the userland set an open drain pin to input i need to set the pin to High-Z (driver "1")

Re: [PATCH] gpio: Add driver for MEN 16Z127 GPIO controller

2015-10-08 Thread Andreas Werner
Hi, i have an additional question regarding the Open Drain setting. The register is currently impelemented as a read/write register which means the pin mode is configurable by software to Push Pull or Open Drain. There is also the possiblity (normal way) that the HW (FPGA) configures each pin to

Re: [PATCH] gpio: Add driver for MEN 16Z127 GPIO controller

2015-10-08 Thread Andreas Werner
Hi, i have an additional question regarding the Open Drain setting. The register is currently impelemented as a read/write register which means the pin mode is configurable by software to Push Pull or Open Drain. There is also the possiblity (normal way) that the HW (FPGA) configures each pin to

Re: [PATCH] gpio: Add driver for MEN 16Z127 GPIO controller

2015-10-08 Thread Andreas Werner
Yet another thing. if i will implement the open drain support, does it really makes sense to go with the generic gpio lib? I need to replace the direction_input and direction_outpu functions because if the userland set an open drain pin to input i need to set the pin to High-Z (driver "1")

Re: [PATCH] gpio: Add driver for MEN 16Z127 GPIO controller

2015-10-06 Thread Andreas Werner
On Tue, Oct 06, 2015 at 09:35:51AM +0200, Linus Walleij wrote: > On Mon, Oct 5, 2015 at 8:09 PM, Andreas Werner wrote: > > > The 16Z127 is a GPIO controller on a MCB FPGA and has 32 > > configurable GPIOs. > > The GPIOs can be configured as inputs and outputs > &

Re: [PATCH] gpio: Add driver for MEN 16Z127 GPIO controller

2015-10-06 Thread Andreas Werner
On Tue, Oct 06, 2015 at 09:35:51AM +0200, Linus Walleij wrote: > On Mon, Oct 5, 2015 at 8:09 PM, Andreas Werner <a...@wernerandy.de> wrote: > > > The 16Z127 is a GPIO controller on a MCB FPGA and has 32 > > configurable GPIOs. > > The GPIOs can be configured as inp

[PATCH] gpio: Add driver for MEN 16Z127 GPIO controller

2015-10-05 Thread Andreas Werner
The 16Z127 is a GPIO controller on a MCB FPGA and has 32 configurable GPIOs. The GPIOs can be configured as inputs and outputs Signed-off-by: Andreas Werner --- drivers/gpio/Kconfig| 6 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-menz127.c | 186

[PATCH] tty: serial: men_z135_uart.c: use mcb memory region size instead of hardcoded one

2015-10-05 Thread Andreas Werner
the resources. This function also takes care of the memory region naming allocated by the driver for each of the instances. Signed-off-by: Andreas Werner --- drivers/tty/serial/men_z135_uart.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/drivers/tty/serial

[PATCH] gpio: Add driver for MEN 16Z127 GPIO controller

2015-10-05 Thread Andreas Werner
The 16Z127 is a GPIO controller on a MCB FPGA and has 32 configurable GPIOs. The GPIOs can be configured as inputs and outputs Signed-off-by: Andreas Werner <a...@wernerandy.de> --- drivers/gpio/Kconfig| 6 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-menz127.c

[PATCH] tty: serial: men_z135_uart.c: use mcb memory region size instead of hardcoded one

2015-10-05 Thread Andreas Werner
the resources. This function also takes care of the memory region naming allocated by the driver for each of the instances. Signed-off-by: Andreas Werner <a...@wernerandy.de> --- drivers/tty/serial/men_z135_uart.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff

RE: [PATCH] backlight: lp855x: Make sure props struct is zeroed

2015-08-27 Thread Johansson, Werner
> > From: Werner Johansson > > > > The driver occasionally got stuck in suspend mode or other strange > > states as those parts of the props struct were never initialized. > > Acked-by: Milo Kim > > Thanks for catching this. You're most welcome! These i

RE: [PATCH] backlight: lp855x: Make sure props struct is zeroed

2015-08-27 Thread Johansson, Werner
From: Werner Johansson werner.johans...@sonymobile.com The driver occasionally got stuck in suspend mode or other strange states as those parts of the props struct were never initialized. Acked-by: Milo Kim milo@ti.com Thanks for catching this. You're most welcome! These issues

Re: [REPOST PATCH 3/3] USB: dwc2: Don't turn off the usbphy in suspend if wakeup is enabled

2015-07-08 Thread Julius Werner
> But I don't see how you will make it work when the root hub itself is > not enabled for wakeup and a non-hub device plugged into one of the > root hub's ports is enabled. > > It seems like you would need a usb_hcd_wakeup_not_needed(hcd, port) > subroutine. We'd just put that in the Tegra

Re: [REPOST PATCH 3/3] USB: dwc2: Don't turn off the usbphy in suspend if wakeup is enabled

2015-07-08 Thread Julius Werner
But I don't see how you will make it work when the root hub itself is not enabled for wakeup and a non-hub device plugged into one of the root hub's ports is enabled. It seems like you would need a usb_hcd_wakeup_not_needed(hcd, port) subroutine. We'd just put that in the Tegra platform

Re: [REPOST PATCH 3/3] USB: dwc2: Don't turn off the usbphy in suspend if wakeup is enabled

2015-07-07 Thread Julius Werner
> Doug, how would you feel about reworking the patch that exports > usb_wakeup_enabled_descendants()? Instead of doing it that way, create > and export a new subroutine in hcd.c called > usb_hcd_wakeup_not_needed(), or something similar. We have a use case with another host controller (Tegra,

Re: [REPOST PATCH 3/3] USB: dwc2: Don't turn off the usbphy in suspend if wakeup is enabled

2015-07-07 Thread Julius Werner
Doug, how would you feel about reworking the patch that exports usb_wakeup_enabled_descendants()? Instead of doing it that way, create and export a new subroutine in hcd.c called usb_hcd_wakeup_not_needed(), or something similar. We have a use case with another host controller (Tegra, which

regmap: regmap-debugfs.c crash if max_register is not set

2015-05-31 Thread Andreas Werner
Hi, i am currently working on a driver using regmap. The test system i my Mac Book Air using the i2c-stub driver for the first tests. The Kernel is the Arch Linux Kernel 4.0.2-1-ARCH. First thing after setting up all the ranges was to check the debugfs. After i did a cat on the ranges debugfs

regmap: regmap-debugfs.c crash if max_register is not set

2015-05-31 Thread Andreas Werner
Hi, i am currently working on a driver using regmap. The test system i my Mac Book Air using the i2c-stub driver for the first tests. The Kernel is the Arch Linux Kernel 4.0.2-1-ARCH. First thing after setting up all the ranges was to check the debugfs. After i did a cat on the ranges debugfs

Re: regmap different register size

2015-05-26 Thread Andreas Werner
On Tue, May 26, 2015 at 02:00:39PM -0500, Felipe Balbi wrote: > Hi, > > On Tue, May 26, 2015 at 08:54:25PM +0200, Andreas Werner wrote: > > i have a question regarding regmap usage. > > > > I have a i2c multifunction device which does have a register and valu

regmap different register size

2015-05-26 Thread Andreas Werner
Hi, i have a question regarding regmap usage. I have a i2c multifunction device which does have a register and value width of 8bits except the revision register. The revision can only be read by a i2c block transfer. Does it makes sense to read the Revision once by the i2c API and let the rest

regmap different register size

2015-05-26 Thread Andreas Werner
Hi, i have a question regarding regmap usage. I have a i2c multifunction device which does have a register and value width of 8bits except the revision register. The revision can only be read by a i2c block transfer. Does it makes sense to read the Revision once by the i2c API and let the rest

Re: regmap different register size

2015-05-26 Thread Andreas Werner
On Tue, May 26, 2015 at 02:00:39PM -0500, Felipe Balbi wrote: Hi, On Tue, May 26, 2015 at 08:54:25PM +0200, Andreas Werner wrote: i have a question regarding regmap usage. I have a i2c multifunction device which does have a register and value width of 8bits except the revision

Re: Window watchdog driver design

2015-05-15 Thread Andreas Werner
On Thu, May 14, 2015 at 11:14:19PM -0700, Guenter Roeck wrote: > On 05/14/2015 10:43 PM, Andreas Werner wrote: > >On Thu, May 14, 2015 at 05:52:38PM -0700, Guenter Roeck wrote: > >>On 05/14/2015 07:09 AM, Andreas Werner wrote: > >>>On Thu, May 14, 2015 at 06:30:0

Re: Window watchdog driver design

2015-05-15 Thread Andreas Werner
On Thu, May 14, 2015 at 11:14:19PM -0700, Guenter Roeck wrote: > On 05/14/2015 10:43 PM, Andreas Werner wrote: > >On Thu, May 14, 2015 at 05:52:38PM -0700, Guenter Roeck wrote: > >>On 05/14/2015 07:09 AM, Andreas Werner wrote: > >>>On Thu, May 14, 2015 at 06:30:0

Re: Window watchdog driver design

2015-05-15 Thread Andreas Werner
On Thu, May 14, 2015 at 11:14:19PM -0700, Guenter Roeck wrote: On 05/14/2015 10:43 PM, Andreas Werner wrote: On Thu, May 14, 2015 at 05:52:38PM -0700, Guenter Roeck wrote: On 05/14/2015 07:09 AM, Andreas Werner wrote: On Thu, May 14, 2015 at 06:30:05AM -0700, Guenter Roeck wrote: On 05/14

Re: Window watchdog driver design

2015-05-15 Thread Andreas Werner
On Thu, May 14, 2015 at 11:14:19PM -0700, Guenter Roeck wrote: On 05/14/2015 10:43 PM, Andreas Werner wrote: On Thu, May 14, 2015 at 05:52:38PM -0700, Guenter Roeck wrote: On 05/14/2015 07:09 AM, Andreas Werner wrote: On Thu, May 14, 2015 at 06:30:05AM -0700, Guenter Roeck wrote: On 05/14

Re: Window watchdog driver design

2015-05-14 Thread Andreas Werner
On Thu, May 14, 2015 at 05:52:38PM -0700, Guenter Roeck wrote: > On 05/14/2015 07:09 AM, Andreas Werner wrote: > >On Thu, May 14, 2015 at 06:30:05AM -0700, Guenter Roeck wrote: > >>On 05/14/2015 04:56 AM, Andreas Werner wrote: > >>>Hi, > >>>in t

Re: Window watchdog driver design

2015-05-14 Thread Andreas Werner
On Thu, May 14, 2015 at 06:30:05AM -0700, Guenter Roeck wrote: > On 05/14/2015 04:56 AM, Andreas Werner wrote: > >Hi, > >in the next few weeks I need to write a driver for a window wachtdog > >implemented in a CPLD. I have some questions about the design > >of the drive

Window watchdog driver design

2015-05-14 Thread Andreas Werner
Hi, in the next few weeks I need to write a driver for a window wachtdog implemented in a CPLD. I have some questions about the design of the driver and the best way to write this driver to also be able to submit it. The triggering and configuration of the Watchdog is done by several GPIOs which

Re: Window watchdog driver design

2015-05-14 Thread Andreas Werner
On Thu, May 14, 2015 at 06:30:05AM -0700, Guenter Roeck wrote: On 05/14/2015 04:56 AM, Andreas Werner wrote: Hi, in the next few weeks I need to write a driver for a window wachtdog implemented in a CPLD. I have some questions about the design of the driver and the best way to write

Window watchdog driver design

2015-05-14 Thread Andreas Werner
Hi, in the next few weeks I need to write a driver for a window wachtdog implemented in a CPLD. I have some questions about the design of the driver and the best way to write this driver to also be able to submit it. The triggering and configuration of the Watchdog is done by several GPIOs which

Re: Window watchdog driver design

2015-05-14 Thread Andreas Werner
On Thu, May 14, 2015 at 05:52:38PM -0700, Guenter Roeck wrote: On 05/14/2015 07:09 AM, Andreas Werner wrote: On Thu, May 14, 2015 at 06:30:05AM -0700, Guenter Roeck wrote: On 05/14/2015 04:56 AM, Andreas Werner wrote: Hi, in the next few weeks I need to write a driver for a window wachtdog

[PATCH 2/2] spi/rockchip: Add device tree property to configure Rx Sample Delay

2015-03-26 Thread Julius Werner
evice tree entry that can configure this delay in terms of nanoseconds. The kernel will calculate the best-fitting amount of parent clock ticks to program the controller with based on that. Signed-off-by: Julius Werner --- .../devicetree/bindings/spi/spi-rockchip.txt| 4 drive

[PATCH 1/2] spi/rockchip: Round up clock rate divisor to err on the safe side

2015-03-26 Thread Julius Werner
is even) that then results in an effective frequency of 9900 / 2 == 4950 (potentially exceeding the flash chip's specifications). This patch changes the division to round up to fix this problem. Signed-off-by: Julius Werner --- drivers/spi/spi-rockchip.c | 2 +- 1 file changed, 1

[PATCH 2/2] spi/rockchip: Add device tree property to configure Rx Sample Delay

2015-03-26 Thread Julius Werner
entry that can configure this delay in terms of nanoseconds. The kernel will calculate the best-fitting amount of parent clock ticks to program the controller with based on that. Signed-off-by: Julius Werner jwer...@chromium.org --- .../devicetree/bindings/spi/spi-rockchip.txt| 4

[PATCH 1/2] spi/rockchip: Round up clock rate divisor to err on the safe side

2015-03-26 Thread Julius Werner
is even) that then results in an effective frequency of 9900 / 2 == 4950 (potentially exceeding the flash chip's specifications). This patch changes the division to round up to fix this problem. Signed-off-by: Julius Werner jwer...@chromium.org --- drivers/spi/spi-rockchip.c | 2 +- 1

Re: [RFC PATCH v1] usb: dwc2: reduce dwc2 driver probe time

2015-02-10 Thread Julius Werner
> @@ -2703,7 +2703,7 @@ int dwc2_get_hwparams(struct dwc2_hsotg *hsotg) > gusbcfg = readl(hsotg->regs + GUSBCFG); > gusbcfg &= ~GUSBCFG_FORCEHOSTMODE; > writel(gusbcfg, hsotg->regs + GUSBCFG); > - usleep_range(10, 15); > + usleep_range(25000, 5);

Re: [RFC PATCH v1] usb: dwc2: reduce dwc2 driver probe time

2015-02-10 Thread Julius Werner
@@ -2703,7 +2703,7 @@ int dwc2_get_hwparams(struct dwc2_hsotg *hsotg) gusbcfg = readl(hsotg-regs + GUSBCFG); gusbcfg = ~GUSBCFG_FORCEHOSTMODE; writel(gusbcfg, hsotg-regs + GUSBCFG); - usleep_range(10, 15); + usleep_range(25000, 5); The point

[PATCH v3] usb: Retry port status check on resume to work around RH bugs

2015-01-27 Thread Julius Werner
on other controllers. Signed-off-by: Julius Werner --- drivers/usb/core/hub.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index aeb50bb..26bdd96 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c

[PATCH v3] usb: Retry port status check on resume to work around RH bugs

2015-01-27 Thread Julius Werner
on other controllers. Signed-off-by: Julius Werner jwer...@chromium.org --- drivers/usb/core/hub.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index aeb50bb..26bdd96 100644 --- a/drivers/usb/core/hub.c +++ b/drivers

[PATCH v2] usb: Retry port status check on resume to work around RH bugs

2015-01-26 Thread Julius Werner
on other controllers. Signed-off-by: Julius Werner --- drivers/usb/core/hub.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index aeb50bb..d1d0a66 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c

Re: [PATCH] usb: Retry port status check on resume to work around RH bugs

2015-01-26 Thread Julius Werner
> You should use a sleeping function call, not a delay. Whoops... yes, of course. Guess too much firmware work made me forget what multithreading is there for a moment. Will send a v2. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to

Re: [PATCH] usb: Retry port status check on resume to work around RH bugs

2015-01-26 Thread Julius Werner
You should use a sleeping function call, not a delay. Whoops... yes, of course. Guess too much firmware work made me forget what multithreading is there for a moment. Will send a v2. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to

[PATCH v2] usb: Retry port status check on resume to work around RH bugs

2015-01-26 Thread Julius Werner
on other controllers. Signed-off-by: Julius Werner jwer...@chromium.org --- drivers/usb/core/hub.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index aeb50bb..d1d0a66 100644 --- a/drivers/usb/core/hub.c +++ b/drivers

[PATCH] usb: Retry port status check on resume to work around RH bugs

2015-01-23 Thread Julius Werner
on other controllers. Signed-off-by: Julius Werner --- drivers/usb/core/hub.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index aeb50bb..d1d0a66 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c

[PATCH] usb: Retry port status check on resume to work around RH bugs

2015-01-23 Thread Julius Werner
on other controllers. Signed-off-by: Julius Werner jwer...@chromium.org --- drivers/usb/core/hub.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index aeb50bb..d1d0a66 100644 --- a/drivers/usb/core/hub.c +++ b/drivers

Re: [PATCH 2/2] USB: ehci-platform: Support ehci reset after resume quirk

2014-12-22 Thread Julius Werner
>> The EHCI controller doesn't properly detect the case when > > "The" EHCI controller? I don't know what EHCI controller you're > talking about, but my controllers don't have any trouble detecting > device removal during suspend. This is similar to other SoC-based controllers that loose state

Re: [PATCH 2/2] USB: ehci-platform: Support ehci reset after resume quirk

2014-12-22 Thread Julius Werner
The EHCI controller doesn't properly detect the case when The EHCI controller? I don't know what EHCI controller you're talking about, but my controllers don't have any trouble detecting device removal during suspend. This is similar to other SoC-based controllers that loose state in

Re: Re: [PATCH v2] usb: dwc2: resume root hub when device detect with suspend state

2014-11-19 Thread Julius Werner
On Wed, Nov 19, 2014 at 1:47 AM, 李云志 wrote: > hi Julius & Alan > > Shall we use dwc2's private status "hsotg->lx_state" here instesd of > "hcd->state" for checking root hub is in suspend state ? > I see the EHCI driver do something like this(ehci->rh_state == > EHCI_RH_SUSPENDED) before

Re: Re: [PATCH v2] usb: dwc2: resume root hub when device detect with suspend state

2014-11-19 Thread Julius Werner
On Wed, Nov 19, 2014 at 1:47 AM, 李云志 l...@rock-chips.com wrote: hi Julius Alan Shall we use dwc2's private status hsotg-lx_state here instesd of hcd-state for checking root hub is in suspend state ? I see the EHCI driver do something like this(ehci-rh_state == EHCI_RH_SUSPENDED) before

Re: [PATCH v2] usb: dwc2: resume root hub when device detect with suspend state

2014-11-18 Thread Julius Werner
>> You should be aware that it's not safe to use hcd->state for anything >> in a host controller driver. That field is owned by usbcore, not by >> the HCD, and it is not protected by any locks. >> >> Thus, for example, hcd->state does not get set to HC_STATE_SUSPENDED >> until some time after the

Re: [PATCH v2] usb: dwc2: resume root hub when device detect with suspend state

2014-11-18 Thread Julius Werner
You should be aware that it's not safe to use hcd-state for anything in a host controller driver. That field is owned by usbcore, not by the HCD, and it is not protected by any locks. Thus, for example, hcd-state does not get set to HC_STATE_SUSPENDED until some time after the bus_suspend

Re: [PATCH] usb: dwc2: resume root hub when device detect with suspend state

2014-11-17 Thread Julius Werner
On Mon, Nov 17, 2014 at 5:14 AM, Kever Yang wrote: > After we implement the bus_suspend/resume, auto suspend id enabled. > The root hub will be auto suspend if there is no device connected, > we need to resume the root hub when a device connect detect. > > This patch tested on rk3288. > >

Re: [PATCH] usb: dwc2: resume root hub when device detect with suspend state

2014-11-17 Thread Julius Werner
On Mon, Nov 17, 2014 at 5:14 AM, Kever Yang kever.y...@rock-chips.com wrote: After we implement the bus_suspend/resume, auto suspend id enabled. The root hub will be auto suspend if there is no device connected, we need to resume the root hub when a device connect detect. This patch tested on

Re: [PATCH v3] usb: dwc2: add bus suspend/resume for dwc2

2014-11-13 Thread Julius Werner
> I will figure out how to make dwc2 detect the device connect after auto > suspend, > or disable the auto suspend feature for the dwc2 hcd. I think auto-suspend of the root hub device (which is what calls bus_suspend, but is not the host controller device itself) is expected to always happen and

Re: [PATCH v3] usb: dwc2: add bus suspend/resume for dwc2

2014-11-13 Thread Julius Werner
I will figure out how to make dwc2 detect the device connect after auto suspend, or disable the auto suspend feature for the dwc2 hcd. I think auto-suspend of the root hub device (which is what calls bus_suspend, but is not the host controller device itself) is expected to always happen and

[PATCHv2] checkpatch: Allow certain SI units with three characters

2014-11-10 Thread Julius Werner
for frequency and 1024-based size units (Hz/KHz/MHz/GHz/THz and KiB/MiB/GiB/TiB), since allowing any three character combinations might be too lenient. The list can later be expanded as needed. Signed-off-by: Julius Werner --- scripts/checkpatch.pl | 4 +++- 1 file changed, 3 insertions(+), 1

Re: [PATCH v2] usb: dwc2: add bus suspend/resume for dwc2

2014-11-10 Thread Julius Werner
>> The contract for bus_suspend() is that it will suspend all ports not >> yet suspended, keep track of those ports and then only resume those in >> bus_resume() (compare, for example, how XHCI keeps track of that with >> xhci_bus_state.bus_suspended in xhci_bus_suspend/resume()). So you >> need

Re: [PATCH v2] usb: dwc2: add bus suspend/resume for dwc2

2014-11-10 Thread Julius Werner
The contract for bus_suspend() is that it will suspend all ports not yet suspended, keep track of those ports and then only resume those in bus_resume() (compare, for example, how XHCI keeps track of that with xhci_bus_state.bus_suspended in xhci_bus_suspend/resume()). So you need something

[PATCHv2] checkpatch: Allow certain SI units with three characters

2014-11-10 Thread Julius Werner
for frequency and 1024-based size units (Hz/KHz/MHz/GHz/THz and KiB/MiB/GiB/TiB), since allowing any three character combinations might be too lenient. The list can later be expanded as needed. Signed-off-by: Julius Werner jwer...@chromium.org --- scripts/checkpatch.pl | 4 +++- 1 file changed, 3

<    1   2   3   4   5   6   7   8   9   10   >