[PATCH 2/2] tty: omap-serial: fix a division by zero

2014-09-23 Thread Frans Klaver
[] (do_vfs_ioctl+0x4a0/0x560) [] (do_vfs_ioctl) from [] (SyS_ioctl+0x4c/0x74) [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x30) Signed-off-by: Frans Klaver --- drivers/tty/serial/omap-serial.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/omap-serial.c b

Re: [PATCH 3/4] tty: omap-serial: use threaded interrupt handler

2014-09-23 Thread Frans Klaver
On 23 September 2014 19:17:20 CEST, Peter Hurley wrote: >On 09/23/2014 04:24 AM, Frans Klaver wrote: >> On Wed, Sep 17, 2014 at 02:13:03PM +0200, Frans Klaver wrote: >>> On Wed, Sep 17, 2014 at 08:01:08AM -0400, Peter Hurley wrote: >>>> On 09/16/2014 04:50 AM, Fr

Re: [PATCH 3/4] tty: omap-serial: use threaded interrupt handler

2014-09-23 Thread Frans Klaver
On Wed, Sep 17, 2014 at 02:13:03PM +0200, Frans Klaver wrote: > On Wed, Sep 17, 2014 at 08:01:08AM -0400, Peter Hurley wrote: > > On 09/16/2014 04:50 AM, Frans Klaver wrote: > > > On Mon, Sep 15, 2014 at 01:31:56PM -0400, Peter Hurley wrote: > > >> On 09/15/201

Re: [PATCH 3/4] tty: omap-serial: use threaded interrupt handler

2014-09-23 Thread Frans Klaver
On Wed, Sep 17, 2014 at 02:13:03PM +0200, Frans Klaver wrote: On Wed, Sep 17, 2014 at 08:01:08AM -0400, Peter Hurley wrote: On 09/16/2014 04:50 AM, Frans Klaver wrote: On Mon, Sep 15, 2014 at 01:31:56PM -0400, Peter Hurley wrote: On 09/15/2014 11:39 AM, Peter Hurley wrote: On 09/15

Re: [PATCH 3/4] tty: omap-serial: use threaded interrupt handler

2014-09-23 Thread Frans Klaver
On 23 September 2014 19:17:20 CEST, Peter Hurley pe...@hurleysoftware.com wrote: On 09/23/2014 04:24 AM, Frans Klaver wrote: On Wed, Sep 17, 2014 at 02:13:03PM +0200, Frans Klaver wrote: On Wed, Sep 17, 2014 at 08:01:08AM -0400, Peter Hurley wrote: On 09/16/2014 04:50 AM, Frans Klaver wrote

[PATCH 2/2] tty: omap-serial: fix a division by zero

2014-09-23 Thread Frans Klaver
] (ret_fast_syscall+0x0/0x30) Signed-off-by: Frans Klaver frans.kla...@xsens.com --- drivers/tty/serial/omap-serial.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index ae935ce..7d3f557 100644

[PATCH 0/2] Fix a division by zero

2014-09-23 Thread Frans Klaver
Hi Greg, Here's a couple of patches that fix a divison by zero in omap-serial.c. One's a cleanup, the other the actual fix. Thanks, Frans Frans Klaver (2): tty: omap-serial: pull out calculation from baud_is_mode16 tty: omap-serial: fix a division by zero drivers/tty/serial/omap-serial.c

[PATCH 1/2] tty: omap-serial: pull out calculation from baud_is_mode16

2014-09-23 Thread Frans Klaver
To determine the correct divisor, we need to know the difference between the desired baud rate and the actual baud rate. The calculation for this difference is implemented twice within omap_serial_baud_is_mode16(). Pull out the calculation for easier maintenance. Signed-off-by: Frans Klaver

Re: [PATCH 3/4] tty: omap-serial: use threaded interrupt handler

2014-09-23 Thread Frans Klaver
On Tue, Sep 23, 2014 at 8:38 PM, Tony Lindgren t...@atomide.com wrote: * Frans Klaver franskla...@gmail.com [140923 11:12]: On 23 September 2014 19:17:20 CEST, Peter Hurley pe...@hurleysoftware.com wrote: I would've thought the first 2 patches had already been picked up because they fix

Re: [PATCH 09/16] tty: serial: 8250_dma: Add a TX trigger workaround for AM33xx

2014-09-22 Thread Frans Klaver
On Sun, Sep 21, 2014 at 10:41:00PM +0200, Sebastian Andrzej Siewior wrote: > * Frans Klaver | 2014-09-17 12:28:12 [+0200]: > > >- Bone Black: Yocto poky, core-image-minimal > > Login, "less file" locks up, doesn't show anything. I can exit using > > Ctrl-

Re: [PATCH 09/16] tty: serial: 8250_dma: Add a TX trigger workaround for AM33xx

2014-09-22 Thread Frans Klaver
On Sun, Sep 21, 2014 at 10:41:00PM +0200, Sebastian Andrzej Siewior wrote: * Frans Klaver | 2014-09-17 12:28:12 [+0200]: - Bone Black: Yocto poky, core-image-minimal Login, less file locks up, doesn't show anything. I can exit using Ctrl-C. So I have the same with my and the serial

[PATCH] eeepc-laptop: clean up control flow in *_rfkill_notifier

2014-09-20 Thread Frans Klaver
Handle errors immediately in eeepc_register_rfkill_notifier and eeepc_unregister_rfkill_notifier. This clears up the control flow for the reader. It also removes unnecessary indentation. Signed-off-by: Frans Klaver --- This depends on the earlier eeepc cleanup series [1] to apply cleanly. [1

[PATCH] eeepc-laptop: clean up control flow in *_rfkill_notifier

2014-09-20 Thread Frans Klaver
Handle errors immediately in eeepc_register_rfkill_notifier and eeepc_unregister_rfkill_notifier. This clears up the control flow for the reader. It also removes unnecessary indentation. Signed-off-by: Frans Klaver franskla...@gmail.com --- This depends on the earlier eeepc cleanup series [1

Re: [PATCH v2 0/9] eeepc cleanup

2014-09-19 Thread Frans Klaver
On 19 September 2014 19:25:38 CEST, Darren Hart wrote: >On Wed, Sep 17, 2014 at 11:47:18PM +0200, Frans Klaver wrote: >> Here's the second installment cleaning up some things in the eeepc >laptop >> driver. >> >> This depends on "eeepc-laptop: simplify parse_

Re: [PATCH 1/9] eeepc-laptop: clean up coding style

2014-09-19 Thread Frans Klaver
On 19 September 2014 18:46:03 CEST, Darren Hart wrote: >On Thu, Sep 18, 2014 at 07:01:25AM +0200, Frans Klaver wrote: >> On 18 September 2014 00:06:52 CEST, Joe Perches >wrote: >> >On Wed, 2014-09-17 at 23:47 +0200, Frans Klaver wrote: >> >> Correct inde

Re: [PATCH 1/9] eeepc-laptop: clean up coding style

2014-09-19 Thread Frans Klaver
On 19 September 2014 18:46:03 CEST, Darren Hart dvh...@infradead.org wrote: On Thu, Sep 18, 2014 at 07:01:25AM +0200, Frans Klaver wrote: On 18 September 2014 00:06:52 CEST, Joe Perches j...@perches.com wrote: On Wed, 2014-09-17 at 23:47 +0200, Frans Klaver wrote: Correct indentation and brace

Re: [PATCH v2 0/9] eeepc cleanup

2014-09-19 Thread Frans Klaver
On 19 September 2014 19:25:38 CEST, Darren Hart dvh...@infradead.org wrote: On Wed, Sep 17, 2014 at 11:47:18PM +0200, Frans Klaver wrote: Here's the second installment cleaning up some things in the eeepc laptop driver. This depends on eeepc-laptop: simplify parse_arg(). For those

Re: [PATCH 5/9] eeepc-laptop: tell sysfs that the disp attribute is write-only

2014-09-17 Thread Frans Klaver
On 18 September 2014 00:07:53 CEST, Greg Kroah-Hartman wrote: >On Wed, Sep 17, 2014 at 11:47:23PM +0200, Frans Klaver wrote: >> The disp attribute is write-only, but sysfs doesn't know this. >Currently >> show_sys_acpi() is mimicking sysfs behavior, if the underlying acpi &g

Re: [PATCH 1/9] eeepc-laptop: clean up coding style

2014-09-17 Thread Frans Klaver
On 18 September 2014 00:06:52 CEST, Joe Perches wrote: >On Wed, 2014-09-17 at 23:47 +0200, Frans Klaver wrote: >> Correct indentation and brace usage to comply with >> Documentation/CodingStyle. >> >> Signed-off-by: Frans Klaver >> --- >> drivers/platfor

[PATCH v2 0/9] eeepc cleanup

2014-09-17 Thread Frans Klaver
v2 v1..v2: - squash coding style fixes - drop patch moving to file permission macros, in favor of - move towards better sysfs api usage - drop changes to existing sysfs return values Frans Klaver (9): eeepc-laptop: clean up coding style eeepc-laptop: change sysfs function na

[PATCH 3/9] eeepc-laptop: use DEVICE_ATTR* to instantiate device_attributes

2014-09-17 Thread Frans Klaver
Device attributes are instantiated manually, while we have DEVICE_ATTR* macros available to do much of the work for us. Let's use them. Signed-off-by: Frans Klaver --- drivers/platform/x86/eeepc-laptop.c | 34 -- 1 file changed, 4 insertions(+), 30 deletions

[PATCH 1/9] eeepc-laptop: clean up coding style

2014-09-17 Thread Frans Klaver
Correct indentation and brace usage to comply with Documentation/CodingStyle. Signed-off-by: Frans Klaver --- drivers/platform/x86/eeepc-laptop.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc

[PATCH 2/9] eeepc-laptop: change sysfs function names to API expectations

2014-09-17 Thread Frans Klaver
The eeepc-laptop driver follows the function naming convention _(), while the sysfs macros are built around the convention _(). Rename the sysfs functions to the convention used by sysfs. This makes it easier to use the available API later on. Signed-off-by: Frans Klaver --- drivers/platform

[PATCH 5/9] eeepc-laptop: tell sysfs that the disp attribute is write-only

2014-09-17 Thread Frans Klaver
Append _RW to the name for readability. Signed-off-by: Frans Klaver --- Here we're sticking with -EIO as return values. It should be said that the commit mentioned above did change the error value from -ENODEV to -EIO. I'm still in two minds about whether the show_sys_acpi and store_sys_acpi shou

[PATCH 4/9] eeepc-laptop: pull out ACPI_STORE_FUNC and ACPI_SHOW_FUNC macros

2014-09-17 Thread Frans Klaver
Pull out macros EEEPC_ACPI_STORE_FUNC and EEEPC_ACPI_SHOW_FUNC. These macros define functions that call store_sys_acpi() and show_sys_acpi() respectively. This helps prevent duplication later on. Signed-off-by: Frans Klaver --- drivers/platform/x86/eeepc-laptop.c | 12 +--- 1 file

[PATCH 6/9] eeepc-laptop: pull out SENSOR_STORE_FUNC and SENSOR_SHOW_FUNC macros

2014-09-17 Thread Frans Klaver
Pull out EEEPC_SENSOR_STORE_FUNC and EEEPC_SENSOR_SHOW_FUNC. These macros define functions that call store_sys_hwmon() and show_sys_hwmon() respectively. This helps prevent duplication later on. Signed-off-by: Frans Klaver --- drivers/platform/x86/eeepc-laptop.c | 12 +--- 1 file

[PATCH 9/9] eeepc-laptop: store_cpufv: return error if set_acpi fails

2014-09-17 Thread Frans Klaver
The result of set_acpi is left unchecked, but it may return errors. If one occurs, send the error to the caller. There's no reason to lie about it, if set_acpi fails. Signed-off-by: Frans Klaver --- drivers/platform/x86/eeepc-laptop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

[PATCH 8/9] eeepc-laptop: check proper return values in get_cpufv

2014-09-17 Thread Frans Klaver
we can ignore values below zero. Check the result of get_acpi() right away. While at it, propagate the error if we got one. Signed-off-by: Frans Klaver --- drivers/platform/x86/eeepc-laptop.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/eeepc-lapto

[PATCH 7/9] eeepc-laptop: make fan1_input really read-only

2014-09-17 Thread Frans Klaver
-by: Frans Klaver --- drivers/platform/x86/eeepc-laptop.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index ba251bb..e93a54e 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b

Re: [PATCH v3] eeepc-laptop: simplify parse_arg()

2014-09-17 Thread Frans Klaver
On Wed, Sep 17, 2014 at 01:35:10PM -0700, Darren Hart wrote: > On Wed, Sep 17, 2014 at 09:02:51PM +0200, Paul Bolle wrote: > > parse_arg() has three possible return values: > > -EINVAL if sscanf(), in short, fails; > > zero if "count" is zero; and > > "count" in all other cases > > >

Re: [PATCH v3] eeepc-laptop: simplify parse_arg()

2014-09-17 Thread Frans Klaver
On Wed, Sep 17, 2014 at 01:35:10PM -0700, Darren Hart wrote: > On Wed, Sep 17, 2014 at 09:02:51PM +0200, Paul Bolle wrote: > > parse_arg() has three possible return values: > > -EINVAL if sscanf(), in short, fails; > > zero if "count" is zero; and > > "count" in all other cases > > >

Re: [PATCH 3/4] tty: omap-serial: use threaded interrupt handler

2014-09-17 Thread Frans Klaver
On Wed, Sep 17, 2014 at 08:01:08AM -0400, Peter Hurley wrote: > On 09/16/2014 04:50 AM, Frans Klaver wrote: > > On Mon, Sep 15, 2014 at 01:31:56PM -0400, Peter Hurley wrote: > >> On 09/15/2014 11:39 AM, Peter Hurley wrote: > >>> On 09/15/2014 10:00 AM, Frans Kl

Re: [PATCH 10/13] eeepc-laptop: compare proper return values in get_cpufv

2014-09-17 Thread Frans Klaver
On Wed, Sep 17, 2014 at 12:34 PM, Henrique de Moraes Holschuh wrote: > On Tue, 16 Sep 2014, Darren Hart wrote: >> - When reading and writing sysfs device attribute files, avoid dependency >> on specific error codes wherever possible. This minimizes coupling to >> the error handling

Re: [PATCH 09/16] tty: serial: 8250_dma: Add a TX trigger workaround for AM33xx

2014-09-17 Thread Frans Klaver
Hi, Yesterday's testing was a bit messy. So here goes again. On Mon, Sep 15, 2014 at 06:42:04PM +0200, Sebastian Andrzej Siewior wrote: > On 09/12/2014 12:28 PM, Frans Klaver wrote: > > port config is 115200 8N1. I don't recall doing anything special. I > > boot, login, less file

Re: [PATCH 09/16] tty: serial: 8250_dma: Add a TX trigger workaround for AM33xx

2014-09-17 Thread Frans Klaver
Hi, Yesterday's testing was a bit messy. So here goes again. On Mon, Sep 15, 2014 at 06:42:04PM +0200, Sebastian Andrzej Siewior wrote: On 09/12/2014 12:28 PM, Frans Klaver wrote: port config is 115200 8N1. I don't recall doing anything special. I boot, login, less file and get a lock

Re: [PATCH 10/13] eeepc-laptop: compare proper return values in get_cpufv

2014-09-17 Thread Frans Klaver
On Wed, Sep 17, 2014 at 12:34 PM, Henrique de Moraes Holschuh h...@hmh.eng.br wrote: On Tue, 16 Sep 2014, Darren Hart wrote: - When reading and writing sysfs device attribute files, avoid dependency on specific error codes wherever possible. This minimizes coupling to the error handling

Re: [PATCH 3/4] tty: omap-serial: use threaded interrupt handler

2014-09-17 Thread Frans Klaver
On Wed, Sep 17, 2014 at 08:01:08AM -0400, Peter Hurley wrote: On 09/16/2014 04:50 AM, Frans Klaver wrote: On Mon, Sep 15, 2014 at 01:31:56PM -0400, Peter Hurley wrote: On 09/15/2014 11:39 AM, Peter Hurley wrote: On 09/15/2014 10:00 AM, Frans Klaver wrote: At 3.6Mbaud, with slightly over

Re: [PATCH v3] eeepc-laptop: simplify parse_arg()

2014-09-17 Thread Frans Klaver
On Wed, Sep 17, 2014 at 01:35:10PM -0700, Darren Hart wrote: On Wed, Sep 17, 2014 at 09:02:51PM +0200, Paul Bolle wrote: parse_arg() has three possible return values: -EINVAL if sscanf(), in short, fails; zero if count is zero; and count in all other cases But count will

Re: [PATCH v3] eeepc-laptop: simplify parse_arg()

2014-09-17 Thread Frans Klaver
On Wed, Sep 17, 2014 at 01:35:10PM -0700, Darren Hart wrote: On Wed, Sep 17, 2014 at 09:02:51PM +0200, Paul Bolle wrote: parse_arg() has three possible return values: -EINVAL if sscanf(), in short, fails; zero if count is zero; and count in all other cases But count will

[PATCH 7/9] eeepc-laptop: make fan1_input really read-only

2014-09-17 Thread Frans Klaver
-by: Frans Klaver franskla...@gmail.com --- drivers/platform/x86/eeepc-laptop.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index ba251bb..e93a54e 100644 --- a/drivers/platform/x86

[PATCH 9/9] eeepc-laptop: store_cpufv: return error if set_acpi fails

2014-09-17 Thread Frans Klaver
The result of set_acpi is left unchecked, but it may return errors. If one occurs, send the error to the caller. There's no reason to lie about it, if set_acpi fails. Signed-off-by: Frans Klaver franskla...@gmail.com --- drivers/platform/x86/eeepc-laptop.c | 4 +++- 1 file changed, 3 insertions

[PATCH 8/9] eeepc-laptop: check proper return values in get_cpufv

2014-09-17 Thread Frans Klaver
values below zero. Check the result of get_acpi() right away. While at it, propagate the error if we got one. Signed-off-by: Frans Klaver franskla...@gmail.com --- drivers/platform/x86/eeepc-laptop.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86

[PATCH 6/9] eeepc-laptop: pull out SENSOR_STORE_FUNC and SENSOR_SHOW_FUNC macros

2014-09-17 Thread Frans Klaver
Pull out EEEPC_SENSOR_STORE_FUNC and EEEPC_SENSOR_SHOW_FUNC. These macros define functions that call store_sys_hwmon() and show_sys_hwmon() respectively. This helps prevent duplication later on. Signed-off-by: Frans Klaver franskla...@gmail.com --- drivers/platform/x86/eeepc-laptop.c | 12

[PATCH 4/9] eeepc-laptop: pull out ACPI_STORE_FUNC and ACPI_SHOW_FUNC macros

2014-09-17 Thread Frans Klaver
Pull out macros EEEPC_ACPI_STORE_FUNC and EEEPC_ACPI_SHOW_FUNC. These macros define functions that call store_sys_acpi() and show_sys_acpi() respectively. This helps prevent duplication later on. Signed-off-by: Frans Klaver franskla...@gmail.com --- drivers/platform/x86/eeepc-laptop.c | 12

[PATCH 5/9] eeepc-laptop: tell sysfs that the disp attribute is write-only

2014-09-17 Thread Frans Klaver
to the name for readability. Signed-off-by: Frans Klaver franskla...@gmail.com --- Here we're sticking with -EIO as return values. It should be said that the commit mentioned above did change the error value from -ENODEV to -EIO. I'm still in two minds about whether the show_sys_acpi

[PATCH 2/9] eeepc-laptop: change sysfs function names to API expectations

2014-09-17 Thread Frans Klaver
The eeepc-laptop driver follows the function naming convention action_attrname(), while the sysfs macros are built around the convention attrname_action(). Rename the sysfs functions to the convention used by sysfs. This makes it easier to use the available API later on. Signed-off-by: Frans

[PATCH 1/9] eeepc-laptop: clean up coding style

2014-09-17 Thread Frans Klaver
Correct indentation and brace usage to comply with Documentation/CodingStyle. Signed-off-by: Frans Klaver franskla...@gmail.com --- drivers/platform/x86/eeepc-laptop.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers

[PATCH 3/9] eeepc-laptop: use DEVICE_ATTR* to instantiate device_attributes

2014-09-17 Thread Frans Klaver
Device attributes are instantiated manually, while we have DEVICE_ATTR* macros available to do much of the work for us. Let's use them. Signed-off-by: Frans Klaver franskla...@gmail.com --- drivers/platform/x86/eeepc-laptop.c | 34 -- 1 file changed, 4 insertions

[PATCH v2 0/9] eeepc cleanup

2014-09-17 Thread Frans Klaver
: - squash coding style fixes - drop patch moving to file permission macros, in favor of - move towards better sysfs api usage - drop changes to existing sysfs return values Frans Klaver (9): eeepc-laptop: clean up coding style eeepc-laptop: change sysfs function names to API expectations

Re: [PATCH 1/9] eeepc-laptop: clean up coding style

2014-09-17 Thread Frans Klaver
On 18 September 2014 00:06:52 CEST, Joe Perches j...@perches.com wrote: On Wed, 2014-09-17 at 23:47 +0200, Frans Klaver wrote: Correct indentation and brace usage to comply with Documentation/CodingStyle. Signed-off-by: Frans Klaver franskla...@gmail.com --- drivers/platform/x86/eeepc

Re: [PATCH 5/9] eeepc-laptop: tell sysfs that the disp attribute is write-only

2014-09-17 Thread Frans Klaver
On 18 September 2014 00:07:53 CEST, Greg Kroah-Hartman gre...@linuxfoundation.org wrote: On Wed, Sep 17, 2014 at 11:47:23PM +0200, Frans Klaver wrote: The disp attribute is write-only, but sysfs doesn't know this. Currently show_sys_acpi() is mimicking sysfs behavior, if the underlying acpi

Re: [PATCH 10/13] eeepc-laptop: compare proper return values in get_cpufv

2014-09-16 Thread Frans Klaver
On Tue, Sep 16, 2014 at 02:27:15PM -0700, Darren Hart wrote: > > - When reading and writing sysfs device attribute files, avoid dependency > on specific error codes wherever possible. This minimizes coupling to > the error handling implemementation within the kernel. > > In general,

Re: [PATCH 10/13] eeepc-laptop: compare proper return values in get_cpufv

2014-09-16 Thread Frans Klaver
On Tue, Sep 16, 2014 at 01:52:47PM -0700, Darren Hart wrote: > On Tue, Sep 16, 2014 at 01:54:25PM +0200, Frans Klaver wrote: > > On Mon, Sep 15, 2014 at 11:55 PM, Frans Klaver > > wrote: > > > On Mon, Sep 15, 2014 at 02:51:25PM -0700, Greg Kroah-Hartman wrote: > >

Re: [PATCH 09/16] tty: serial: 8250_dma: Add a TX trigger workaround for AM33xx

2014-09-16 Thread Frans Klaver
On Tue, Sep 16, 2014 at 02:42:00PM +0200, Frans Klaver wrote: > On Tue, Sep 16, 2014 at 11:05:40AM +0200, Frans Klaver wrote: > > On Mon, Sep 15, 2014 at 06:42:04PM +0200, Sebastian Andrzej Siewior wrote: > > > If there is nothing specific to the file you do less on I have no id

Re: [PATCH 09/16] tty: serial: 8250_dma: Add a TX trigger workaround for AM33xx

2014-09-16 Thread Frans Klaver
On Tue, Sep 16, 2014 at 11:05:40AM +0200, Frans Klaver wrote: > On Mon, Sep 15, 2014 at 06:42:04PM +0200, Sebastian Andrzej Siewior wrote: > > On 09/12/2014 12:28 PM, Frans Klaver wrote: > > > port config is 115200 8N1. I don't recall doing anything special. I > > > boo

Re: [PATCH 10/13] eeepc-laptop: compare proper return values in get_cpufv

2014-09-16 Thread Frans Klaver
On Mon, Sep 15, 2014 at 11:55 PM, Frans Klaver wrote: > On Mon, Sep 15, 2014 at 02:51:25PM -0700, Greg Kroah-Hartman wrote: >> On Mon, Sep 15, 2014 at 02:49:02PM -0700, Darren Hart wrote: >> > >> > This patch is fine as is. However, Greg has supported propogating the &

Re: [PATCH 09/16] tty: serial: 8250_dma: Add a TX trigger workaround for AM33xx

2014-09-16 Thread Frans Klaver
On Mon, Sep 15, 2014 at 06:42:04PM +0200, Sebastian Andrzej Siewior wrote: > On 09/12/2014 12:28 PM, Frans Klaver wrote: > > port config is 115200 8N1. I don't recall doing anything special. I > > boot, login, less file and get a lock. > > So I booted my mini Debian 7.6 (b

Re: [PATCH 3/4] tty: omap-serial: use threaded interrupt handler

2014-09-16 Thread Frans Klaver
On Mon, Sep 15, 2014 at 01:31:56PM -0400, Peter Hurley wrote: > On 09/15/2014 11:39 AM, Peter Hurley wrote: > > On 09/15/2014 10:00 AM, Frans Klaver wrote: > >> At 3.6Mbaud, with slightly over 2Mbit/s data coming in, we see 1600 uart > >> rx buffer overflows w

Re: [PATCH 3/4] tty: omap-serial: use threaded interrupt handler

2014-09-16 Thread Frans Klaver
On Mon, Sep 15, 2014 at 01:31:56PM -0400, Peter Hurley wrote: On 09/15/2014 11:39 AM, Peter Hurley wrote: On 09/15/2014 10:00 AM, Frans Klaver wrote: At 3.6Mbaud, with slightly over 2Mbit/s data coming in, we see 1600 uart rx buffer overflows within 30 seconds. Threading the interrupt

Re: [PATCH 09/16] tty: serial: 8250_dma: Add a TX trigger workaround for AM33xx

2014-09-16 Thread Frans Klaver
On Mon, Sep 15, 2014 at 06:42:04PM +0200, Sebastian Andrzej Siewior wrote: On 09/12/2014 12:28 PM, Frans Klaver wrote: port config is 115200 8N1. I don't recall doing anything special. I boot, login, less file and get a lock. So I booted my mini Debian 7.6 (basic system + openssh) on my

Re: [PATCH 10/13] eeepc-laptop: compare proper return values in get_cpufv

2014-09-16 Thread Frans Klaver
On Mon, Sep 15, 2014 at 11:55 PM, Frans Klaver franskla...@gmail.com wrote: On Mon, Sep 15, 2014 at 02:51:25PM -0700, Greg Kroah-Hartman wrote: On Mon, Sep 15, 2014 at 02:49:02PM -0700, Darren Hart wrote: This patch is fine as is. However, Greg has supported propogating the error code

Re: [PATCH 09/16] tty: serial: 8250_dma: Add a TX trigger workaround for AM33xx

2014-09-16 Thread Frans Klaver
On Tue, Sep 16, 2014 at 11:05:40AM +0200, Frans Klaver wrote: On Mon, Sep 15, 2014 at 06:42:04PM +0200, Sebastian Andrzej Siewior wrote: On 09/12/2014 12:28 PM, Frans Klaver wrote: port config is 115200 8N1. I don't recall doing anything special. I boot, login, less file and get a lock

Re: [PATCH 09/16] tty: serial: 8250_dma: Add a TX trigger workaround for AM33xx

2014-09-16 Thread Frans Klaver
On Tue, Sep 16, 2014 at 02:42:00PM +0200, Frans Klaver wrote: On Tue, Sep 16, 2014 at 11:05:40AM +0200, Frans Klaver wrote: On Mon, Sep 15, 2014 at 06:42:04PM +0200, Sebastian Andrzej Siewior wrote: If there is nothing specific to the file you do less on I have no idea what else it could

Re: [PATCH 10/13] eeepc-laptop: compare proper return values in get_cpufv

2014-09-16 Thread Frans Klaver
On Tue, Sep 16, 2014 at 01:52:47PM -0700, Darren Hart wrote: On Tue, Sep 16, 2014 at 01:54:25PM +0200, Frans Klaver wrote: On Mon, Sep 15, 2014 at 11:55 PM, Frans Klaver franskla...@gmail.com wrote: On Mon, Sep 15, 2014 at 02:51:25PM -0700, Greg Kroah-Hartman wrote: On Mon, Sep 15

Re: [PATCH 10/13] eeepc-laptop: compare proper return values in get_cpufv

2014-09-16 Thread Frans Klaver
On Tue, Sep 16, 2014 at 02:27:15PM -0700, Darren Hart wrote: - When reading and writing sysfs device attribute files, avoid dependency on specific error codes wherever possible. This minimizes coupling to the error handling implemementation within the kernel. In general, failures to

Re: [PATCH 10/13] eeepc-laptop: compare proper return values in get_cpufv

2014-09-15 Thread Frans Klaver
On Mon, Sep 15, 2014 at 02:51:25PM -0700, Greg Kroah-Hartman wrote: > On Mon, Sep 15, 2014 at 02:49:02PM -0700, Darren Hart wrote: > > On Sat, Sep 13, 2014 at 01:06:49AM +0200, Frans Klaver wrote: > > > In get_cpufv the return value of get_acpi is stored in the cpufv struct.

Re: [PATCH 07/13] eeepc-laptop: make disp attribute really write-only

2014-09-15 Thread Frans Klaver
On Mon, Sep 15, 2014 at 01:00:07PM -0700, Darren Hart wrote: > On Sat, Sep 13, 2014 at 01:06:46AM +0200, Frans Klaver wrote: > > The disp attribute is write-only, but sysfs doesn't know this. Currently > > show_sys_acpi() is mimicking sysfs behavior, if the underlying acpi call

Re: [PATCH 03/13] eeepc-laptop: coding style: add curly braces around else compound

2014-09-15 Thread Frans Klaver
On Mon, Sep 15, 2014 at 12:41:41PM -0700, Darren Hart wrote: > On Sat, Sep 13, 2014 at 01:06:42AM +0200, Frans Klaver wrote: > > Signed-off-by: Frans Klaver > > Hi Frans, > > Please merge the 3 coding style fixes into one patch. There is no functional > change here, and

[PATCH 2/4] tty: omap-serial: prevent division by zero

2014-09-15 Thread Frans Klaver
If the chosen baud rate is large enough (e.g. 3.5 megabaud), the calculated n values in calculate_baud_abs_diff may become 0. This causes a division by zero when calculating the difference between calculated and desired baud rates. To prevent this, cap n on 1. Signed-off-by: Frans Klaver

[PATCH 1/4] tty: omap-serial: pull out calculation from baud_is_mode16

2014-09-15 Thread Frans Klaver
To determine the correct divisor, we need to know the difference between the desired baud rate and the actual baud rate. The calculation for this difference is implemented twice within omap_serial_baud_is_mode16(). Pull out the calculation for easier maintenance. Signed-off-by: Frans Klaver

[PATCH 4/4] tty: omap-serial: support setting of hardware flow control in dts

2014-09-15 Thread Frans Klaver
This makes hardware flow control availability configurable from the device tree. Signed-off-by: Frans Klaver --- Documentation/devicetree/bindings/serial/omap_serial.txt | 1 + drivers/tty/serial/omap-serial.c | 4 2 files changed, 5 insertions(+) diff --git

[PATCH 3/4] tty: omap-serial: use threaded interrupt handler

2014-09-15 Thread Frans Klaver
doesn't have to buffer as much either. Signed-off-by: Frans Klaver --- drivers/tty/serial/omap-serial.c | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 7d3f557..398139a 100644

[PATCH v3 0/4] omap-serial high-speed fixes/improvements

2014-09-15 Thread Frans Klaver
ision by zero" - use IRQ_ONESHOT for the threaded irq in "use threaded interrupt handler" v1..v2 - centralize baud_is_mode16's calculation - fix/unbreak an uninitialized variable in "use threaded interrupt handler" - read has-hw-flow-control property in of_get_uart_port

[PATCH v3 0/4] omap-serial high-speed fixes/improvements

2014-09-15 Thread Frans Klaver
- use IRQ_ONESHOT for the threaded irq in use threaded interrupt handler v1..v2 - centralize baud_is_mode16's calculation - fix/unbreak an uninitialized variable in use threaded interrupt handler - read has-hw-flow-control property in of_get_uart_port_info Frans Klaver (4): tty: omap

[PATCH 3/4] tty: omap-serial: use threaded interrupt handler

2014-09-15 Thread Frans Klaver
doesn't have to buffer as much either. Signed-off-by: Frans Klaver frans.kla...@xsens.com --- drivers/tty/serial/omap-serial.c | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index

[PATCH 4/4] tty: omap-serial: support setting of hardware flow control in dts

2014-09-15 Thread Frans Klaver
This makes hardware flow control availability configurable from the device tree. Signed-off-by: Frans Klaver frans.kla...@xsens.com --- Documentation/devicetree/bindings/serial/omap_serial.txt | 1 + drivers/tty/serial/omap-serial.c | 4 2 files changed, 5 insertions

[PATCH 1/4] tty: omap-serial: pull out calculation from baud_is_mode16

2014-09-15 Thread Frans Klaver
To determine the correct divisor, we need to know the difference between the desired baud rate and the actual baud rate. The calculation for this difference is implemented twice within omap_serial_baud_is_mode16(). Pull out the calculation for easier maintenance. Signed-off-by: Frans Klaver

[PATCH 2/4] tty: omap-serial: prevent division by zero

2014-09-15 Thread Frans Klaver
If the chosen baud rate is large enough (e.g. 3.5 megabaud), the calculated n values in calculate_baud_abs_diff may become 0. This causes a division by zero when calculating the difference between calculated and desired baud rates. To prevent this, cap n on 1. Signed-off-by: Frans Klaver

Re: [PATCH 03/13] eeepc-laptop: coding style: add curly braces around else compound

2014-09-15 Thread Frans Klaver
On Mon, Sep 15, 2014 at 12:41:41PM -0700, Darren Hart wrote: On Sat, Sep 13, 2014 at 01:06:42AM +0200, Frans Klaver wrote: Signed-off-by: Frans Klaver franskla...@gmail.com Hi Frans, Please merge the 3 coding style fixes into one patch. There is no functional change here, and each

Re: [PATCH 07/13] eeepc-laptop: make disp attribute really write-only

2014-09-15 Thread Frans Klaver
On Mon, Sep 15, 2014 at 01:00:07PM -0700, Darren Hart wrote: On Sat, Sep 13, 2014 at 01:06:46AM +0200, Frans Klaver wrote: The disp attribute is write-only, but sysfs doesn't know this. Currently show_sys_acpi() is mimicking sysfs behavior, if the underlying acpi call should fail

Re: [PATCH 10/13] eeepc-laptop: compare proper return values in get_cpufv

2014-09-15 Thread Frans Klaver
On Mon, Sep 15, 2014 at 02:51:25PM -0700, Greg Kroah-Hartman wrote: On Mon, Sep 15, 2014 at 02:49:02PM -0700, Darren Hart wrote: On Sat, Sep 13, 2014 at 01:06:49AM +0200, Frans Klaver wrote: In get_cpufv the return value of get_acpi is stored in the cpufv struct. Right before this value

Re: [PATCH 05/13] eeepc-laptop: use DEVICE_ATTR to instantiate device_attributes

2014-09-14 Thread Frans Klaver
On Fri, Sep 12, 2014 at 04:28:51PM -0700, Greg Kroah-Hartman wrote: > On Sat, Sep 13, 2014 at 01:06:44AM +0200, Frans Klaver wrote: > > Signed-off-by: Frans Klaver > > --- > > drivers/platform/x86/eeepc-laptop.c | 35 > > +-- > &

Re: [PATCH 05/13] eeepc-laptop: use DEVICE_ATTR to instantiate device_attributes

2014-09-14 Thread Frans Klaver
On Fri, Sep 12, 2014 at 04:28:51PM -0700, Greg Kroah-Hartman wrote: On Sat, Sep 13, 2014 at 01:06:44AM +0200, Frans Klaver wrote: Signed-off-by: Frans Klaver franskla...@gmail.com --- drivers/platform/x86/eeepc-laptop.c | 35 +-- 1 file changed, 5

[PATCH 02/13] eeepc-laptop: coding style: add curly braces around else compound

2014-09-12 Thread Frans Klaver
Signed-off-by: Frans Klaver --- drivers/platform/x86/eeepc-laptop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 982778f..702fcbb 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b

[PATCH 00/13] eeepc-laptop cleanups

2014-09-12 Thread Frans Klaver
9/3/865 [2] https://lkml.org/lkml/2014/9/10/742 For those interested, a proper branch is available at: https://github.com/fransklaver/linux wip/eeepc_cleanup_v1 Frans Klaver (13): eeepc-laptop: coding style: fix indentation eeepc-laptop: coding style: add curly braces around els

[PATCH 04/13] eeepc-laptop: use symbolic permissions in device attributes

2014-09-12 Thread Frans Klaver
Signed-off-by: Frans Klaver --- drivers/platform/x86/eeepc-laptop.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 9d8dff9..f35d008 100644 --- a/drivers/platform/x86/eeepc-laptop.c

[PATCH 03/13] eeepc-laptop: coding style: add curly braces around else compound

2014-09-12 Thread Frans Klaver
Signed-off-by: Frans Klaver --- drivers/platform/x86/eeepc-laptop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 702fcbb..9d8dff9 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b

[PATCH 05/13] eeepc-laptop: use DEVICE_ATTR to instantiate device_attributes

2014-09-12 Thread Frans Klaver
Signed-off-by: Frans Klaver --- drivers/platform/x86/eeepc-laptop.c | 35 +-- 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index f35d008..8225b1e 100644 --- a/drivers

[PATCH 06/13] eeepc-laptop: pull out ACPI_STORE_FUNC and ACPI_SHOW_FUNC macros

2014-09-12 Thread Frans Klaver
Pull out macros EEEPC_ACPI_STORE_FUNC and EEEPC_ACPI_SHOW_FUNC. These macros define functions that call store_sys_acpi() and show_sys_acpi() respectively. This helps prevent duplication later on. Signed-off-by: Frans Klaver --- drivers/platform/x86/eeepc-laptop.c | 12 +--- 1 file

[PATCH 09/13] eeepc-laptop: make fan1_input really read-only

2014-09-12 Thread Frans Klaver
the attribute, the system will at least keep its sanity. Signed-off-by: Frans Klaver --- drivers/platform/x86/eeepc-laptop.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index fbaa4d5..47488d3 100644

[PATCH 07/13] eeepc-laptop: make disp attribute really write-only

2014-09-12 Thread Frans Klaver
attribute, and declare the disp attribute with it. Sysfs makes sure userspace can only write to disp at all times. This also means we can back to propagating any errors from get_acpi(). Signed-off-by: Frans Klaver --- drivers/platform/x86/eeepc-laptop.c | 8 ++-- 1 file changed, 6 insertions(+), 2

[PATCH 08/13] eeepc-laptop: pull out SENSOR_STORE_FUNC and SENSOR_SHOW_FUNC macros

2014-09-12 Thread Frans Klaver
Pull out EEEPC_SENSOR_STORE_FUNC and EEEPC_SENSOR_SHOW_FUNC. These macros define functions that call store_sys_hwmon() and show_sys_hwmon() respectively. This helps prevent duplication later on. Signed-off-by: Frans Klaver --- drivers/platform/x86/eeepc-laptop.c | 12 +--- 1 file

[PATCH 10/13] eeepc-laptop: compare proper return values in get_cpufv

2014-09-12 Thread Frans Klaver
we can ignore values below zero. Check the result of get_acpi() right away. While at it, propagate the error if we got one. Signed-off-by: Frans Klaver --- drivers/platform/x86/eeepc-laptop.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/eeepc-lapto

[PATCH 11/13] eeepc-laptop: propagate errors from get_cpufv

2014-09-12 Thread Frans Klaver
In show_available_cpufv, show_cpufv, and store_cpufv, errors from get_cpufv are mapped to -ENODEV. To paint a clear picture to callers, propagate the errors instead. Signed-off-by: Frans Klaver --- drivers/platform/x86/eeepc-laptop.c | 16 ++-- 1 file changed, 10 insertions(+), 6

[PATCH 13/13] eeepc-laptop: return -ENXIO if acpi getter or setter fails

2014-09-12 Thread Frans Klaver
s. Signed-off-by: Frans Klaver --- Changing ENODEV to ENXIO in acpi_setter_handle() probably requires some extra work to get it working properly. I'd propose to dive into that after we finish this series, or we drop this patch from the series and move the whole return value issue into a separate

[PATCH 12/13] eeepc-laptop: store_cpufv: return error if set_acpi fails

2014-09-12 Thread Frans Klaver
The result of set_acpi is left unchecked, but it may return errors. If one occurs, send the error to the caller. Signed-off-by: Frans Klaver --- drivers/platform/x86/eeepc-laptop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/eeepc-laptop.c b

[PATCH 01/13] eeepc-laptop: coding style: fix indentation

2014-09-12 Thread Frans Klaver
Signed-off-by: Frans Klaver --- drivers/platform/x86/eeepc-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 90be993..982778f 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers

Re: [PATCH 09/16] tty: serial: 8250_dma: Add a TX trigger workaround for AM33xx

2014-09-12 Thread Frans Klaver
On Fri, Sep 12, 2014 at 11:51:22AM +0200, Sebastian Andrzej Siewior wrote: > On 09/12/2014 11:40 AM, Frans Klaver wrote: > > > I'm not sure. I just reproduced this on a boneblack, using your uart_v9 > > branch. > > > >> This problem only pops-up if you use

Re: [PATCH 09/16] tty: serial: 8250_dma: Add a TX trigger workaround for AM33xx

2014-09-12 Thread Frans Klaver
On Fri, Sep 12, 2014 at 09:23:24AM +0200, Sebastian Andrzej Siewior wrote: > On 09/11/2014 07:04 PM, Frans Klaver wrote: > > On 11 September 2014 18:04:32 CEST, Sebastian Andrzej Siewior > > wrote: > >> On 09/11/2014 05:11 PM, Frans Klaver wrote: > >> > >&

Re: [PATCH 09/16] tty: serial: 8250_dma: Add a TX trigger workaround for AM33xx

2014-09-12 Thread Frans Klaver
On Fri, Sep 12, 2014 at 09:23:24AM +0200, Sebastian Andrzej Siewior wrote: On 09/11/2014 07:04 PM, Frans Klaver wrote: On 11 September 2014 18:04:32 CEST, Sebastian Andrzej Siewior bige...@linutronix.de wrote: On 09/11/2014 05:11 PM, Frans Klaver wrote: I can still reproduce

<    4   5   6   7   8   9   10   >