On Thu, Jan 15, 2015 at 06:20:43PM +0100, Linus Walleij wrote:
> On Tue, Jan 13, 2015 at 4:09 PM, Mohammad Jamal
> wrote:
>
> > Fix the coding style issue by adding a blank line after declaration
> >
> > Signed-off-by: Mohammad Jamal
>
> Patch applied.
This one looks bogus; it's adding a rando
x_max_size, dln2_rx, dln2);
>
You should remove this stray newline as well.
> - ret = usb_submit_urb(dln2->rx_urb[i], GFP_KERNEL);
> + }
> +
> + return 0;
> +}
Otherwise,
Reviewed-by: Johan Hovold
Johan
--
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 the FAQ at http://www.tux.org/lkml/
On Tue, Dec 16, 2014 at 05:57:15PM +0200, Octavian Purdila wrote:
> Without suspend/resume functionality in the USB driver the USB core
> will disconnect and reconnect the DLN2 port and because the GPIO
> framework does not yet support removal of an in-use controller a
> suspend/resume operation wi
On Thu, Jan 08, 2015 at 02:16:15AM +1300, Octavian Purdila wrote:
> On Wed, Jan 7, 2015 at 11:26 PM, Johan Hovold wrote:
> > On Tue, Dec 16, 2014 at 05:57:15PM +0200, Octavian Purdila wrote:
> >> Without suspend/resume functionality in the USB driver the USB core
> &
On Sat, Jan 10, 2015 at 04:44:32PM -0800, Jeremiah Mahler wrote:
> If a USB serial device is unplugged while there is an active program
> using the device it will spam the logs with -EPROTO (71) messages as it
> attempts to retry.
Can you change this to "might spam", as which error message, and if
On Sun, Jan 11, 2015 at 05:42:05AM -0800, Jeremiah Mahler wrote:
> If a USB serial device (e.g. /dev/ttyUSB0) with an active program is
> unplugged, a bunch of -ENODEV and -EPROTO errors may be produced in the
> logs. This patch set quiets these messages without changing the
> original behavior.
deallocated) we are just leaking the gpio range.
Fixes: 14e85c0e69d5 ("gpio: remove gpio_descs global array")
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib.c | 17 ++---
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiol
uot;gpio / ACPI: register to ACPI events
automatically")
Cc: stable
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 487afe6f22fc..89c59f5f1924 10064
ot;)
Fixes: f23f1516b675 ("gpiolib: provide provision to register pin ranges")
Cc: stable
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 0f8173051edc..37f91
3.19 meanwhile.
Johan
Johan Hovold (6):
gpio: fix memory and reference leaks in gpiochip_add error path
gpio: fix gpio-chip list corruption
gpio: clean up gpiochip_add error handling
gpio: fix memory leak and sleep-while-atomic
gpio: fix sleep-while-atomic in gpiochip_remove
gpio: unreg
Clean up gpiochip_add error handling.
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib.c | 38 +-
1 file changed, 17 insertions(+), 21 deletions(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index ac5944b4e4d8..4efb92ca3463 100644
--- a
Unregister gpiochip device (used to export information through sysfs)
before removing it internally. This way removal will reverse addition.
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpio/gpiolib.c b
e holding a spinlock was
added (a couple of irq-domain paths can end up grabbing mutexes).
Fixes: afa82fab5e13 ("gpio / ACPI: Move event handling registration to
gpiolib irqchip helpers")
Fixes: 1425052097b5 ("gpio: add IRQ chip helpers in gpiolib")
Cc: stable
Signed-off-by: J
Remove bogus call to of_gpiochip_add (and of_gpio_chip remove in error
path) which is also called when adding the gpio chip.
This prevents adding the same pinctrl range twice.
Fixes: 3f8c50c9b110 ("OF: pinctrl: MIPS: lantiq: implement lantiq/xway
pinctrl support")
Signed-off-by: Jo
gpio: lib-sysfs: Add 'wakeup' attribute") in gpio/devel, which adds
yet another device attribute without ever removing it. Unless the commit
in question can be reverted, that leak could be fixed as part of the
merge resolution, I guess.
Johan
Johan Hovold (3):
gpio: sysfs: fix gpi
Fix attribute-creation race with userspace by using the default group
to create also the contingent gpio device attributes.
Fixes: d8f388d8dc8d ("gpio: sysfs interface")
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib-sysfs.c | 61
dr
rface")
Cc: stable # v2.6.27+
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib-sysfs.c | 19 ---
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c
index 2ac1800b58bb..33cf4bd0ed2d 100644
--- a/dr
.
Remove contingent attributes in export error path and on unexport.
Fixes: d8f388d8dc8d ("gpio: sysfs interface")
Cc: stable # v2.6.27+
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib-sysfs.c | 28 +---
1 file changed, 13 insertions(+), 15 deletions(-)
di
[ Please do not top-post. ]
On Fri, Jan 16, 2015 at 10:22:56AM +0530, Jamal Mohammad wrote:
> I think you are write ... checkpatch.pl was giving the error at the
> line so i added a blank line... i will send an updated patch..
You should not trust checkpatch.pl blindly, and not run it on in-kerne
On Thu, Jan 15, 2015 at 11:49:49AM -0800, Soren Brinkmann wrote:
> Add an attribute 'wakeup' to the GPIO sysfs interface which allows
> marking/unmarking a GPIO as wake IRQ.
> The file 'wakeup' is created in each exported GPIOs directory, if an IRQ
> is associated with that GPIO and the irqchip imp
On Fri, Jan 16, 2015 at 08:49:17AM -0800, Sören Brinkmann wrote:
> On Fri, 2015-01-16 at 12:11PM +0100, Johan Hovold wrote:
> > On Thu, Jan 15, 2015 at 11:49:49AM -0800, Soren Brinkmann wrote:
> > > Add an attribute 'wakeup' to the GPIO sysfs interface which allows
&g
On Tue, Jan 13, 2015 at 05:41:45PM +, Colin King wrote:
> From: Colin Ian King
>
> There is old, unused code that is #defined out by the
> use of NOTMOS7840 - this is not defined anywhere. If
> NOTMOS7840 is defined then the code will break on null
> pointer dereferences on mos7840_port. So
On Mon, Jan 19, 2015 at 09:54:55AM +0800, Peter Hung wrote:
> The original driver completed with TX function, but RX/MSR/MCR/LSR is not
> workable with this driver. So we rewrite it to make this device workable.
>
> This patch is tested with PassMark BurnInTest with Cycle-to-115200 +
> MCR/MSR che
On Mon, Jan 19, 2015 at 01:32:58PM +, Colin King wrote:
> From: Colin Ian King
>
> There is old, unused code that is #defined out by the
> use of NOTMOS7840 and NOTMCS7840 - these are not
> defined anywhere.
>
> If NOTMOS7840 is defined then the code will break on null
> pointer dereferences
On Thu, Jan 15, 2015 at 08:34:34AM +, Mark Glover wrote:
> From: Mark Glover
>
> Signed-off-by: Mark Glover
Thanks for the patch and for addressing Peter's comments.
A couple of minor nits: Please use a subsystem prefix for your patch
summary, for example:
"USB: ftdi_sio: add PIDs
On Mon, Jan 19, 2015 at 01:51:34PM +0200, Octavian Purdila wrote:
> Hi Lee,
>
> Here is the 3rd version of the patch-set against for-mfd-next branch
> with the Reviewed-by tags from Johan. Note that I dropped the two GPIO
> patches as they were already merged by Linus W in the GPIO tree.
>
> Than
Hi Greg,
Here are backports of two fixes for memory leaks in the gpio sysfs
interface that are needed in the stable trees.
Tested on 3.12, but will not compile on 3.10 or earlier which lacks
device_create_with_groups. I'll send a second version for these kernels.
Johan
Johan Hovo
with userspace.
Fixes: d8f388d8dc8d ("gpio: sysfs interface")
Cc: stable # v2.6.27+
Signed-off-by: Johan Hovold
Signed-off-by: Linus Walleij
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib.c | 19 ---
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git
attribute-creation race with userspace for these attributes.
Remove contingent attributes in export error path and on unexport.
Fixes: d8f388d8dc8d ("gpio: sysfs interface")
Cc: stable # v2.6.27+
Signed-off-by: Johan Hovold
Signed-off-by: Linus Walleij
Signed-off-by: Johan Hovold
---
dr
attribute-creation race with userspace for these attributes.
Remove contingent attributes in export error path and on unexport.
Fixes: d8f388d8dc8d ("gpio: sysfs interface")
Cc: stable # v2.6.27+
Signed-off-by: Johan Hovold
Signed-off-by: Linus Walleij
[johan: fix lea
with userspace.
Fixes: d8f388d8dc8d ("gpio: sysfs interface")
Cc: stable # v2.6.27+
Signed-off-by: Johan Hovold
Signed-off-by: Linus Walleij
[johan: fix leak without device_create_with_groups, which wasn't
introduced until 3.11 ]
Signed-off-by: Johan Hovold
---
drivers/gpi
And here are the backports of the two fixes for memory leaks in the gpio
sysfs interface for 3.10 and earlier.
Tested on 3.12 and compile-tested on 3.10.
Johan
Johan Hovold (2):
gpio: sysfs: fix gpio-chip device-attribute leak
gpio: sysfs: fix gpio device-attribute leak
drivers/gpio
On Wed, Jan 28, 2015 at 06:46:26PM +0100, Jiri Slaby wrote:
> On 01/28/2015, 05:10 PM, Johan Hovold wrote:
> > On Wed, Jan 28, 2015 at 03:29:30PM +0100, Jiri Slaby wrote:
> >> From: Johan Hovold
> >>
> >> 3.12-stable review patch. If anyone has any
On Wed, Jan 28, 2015 at 02:30:08PM +, Luis Henriques wrote:
> On Tue, Jan 27, 2015 at 05:26:40PM -0800, Greg Kroah-Hartman wrote:
> > @@ -994,6 +991,8 @@ void gpiod_unexport(struct gpio_desc *de
> >
> > dev = class_find_device(&gpio_class, NULL, desc, match_export);
> >
On Wed, Jan 28, 2015 at 01:57:56PM +0800, Peter Hung wrote:
> Add register map for F81232. and add some function to operating this device.
> etc. f81232_get_register()/f81232_set_register() to work with USB control
> point. and worker f81232_int_work_wq() to read MSR when IIR acquired.
>
> Signed-
attribute-creation race with userspace for these attributes.
Remove contingent attributes in export error path and on unexport.
Fixes: d8f388d8dc8d ("gpio: sysfs interface")
Cc: stable # v2.6.27+
Signed-off-by: Johan Hovold
Signed-off-by: Linus Walleij
---
Backport to v3.10 (and earlier) w
On Fri, Mar 20, 2015 at 08:23:18PM +0100, Bartlomiej Zolnierkiewicz wrote:
> Commit 6e3f62f0793e ("mfd: core: Fix platform-device id generation")
> changed the way platform device ids are generated from mfd id base and
> cell ids in mfd_add_device(). Unfortunately the change in question
> breaks
On Thu, Apr 02, 2015 at 12:12:37PM +0200, Jonathan Corbet wrote:
> On Sat, 28 Mar 2015 14:37:57 +0100
> Marek Belisko wrote:
>
> > This patch changes the documentation file as needed.
>
> Applied to the docs tree (with the changelog typo fixed).
This patch was incorrect and needed to be updated
On Thu, Apr 02, 2015 at 04:25:50PM +0200, Dr. H. Nikolaus Schaller wrote:
> But it is outdated. The parameters vendor= and product= are no longer
> available since ca. 3.12 which means that documentation is lagging behind
> quite some time.
> >>>
> >>> This is simply not true. The
On Tue, Mar 03, 2015 at 11:57:04AM -0600, George McCollister wrote:
> This driver is for the NovaTech 124 4x serial expansion board for the
> NovaTech OrionLXm.
>
> Firmware source code can be found here:
> https://github.com/novatechweb/nt124
>
> Signed-off-by: George McCollister
> ---
> Change
ement (un)map_urb_for_dma hooks")
Cc: stable # v3.10
Signed-off-by: Johan Hovold
---
drivers/usb/musb/musb_host.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index c3d5fc9dfb5b..d8327ec19a1f 100644
--- a/d
unaligned transfers, appears to already get this right.
Johan
Johan Hovold (2):
USB: musb: fix inefficient copy of unaligned buffers
USB: ehci-tegra: fix inefficient copy of unaligned buffers
drivers/usb/host/ehci-tegra.c | 2 +-
drivers/usb/musb/musb_host.c | 2 +-
2 files changed, 2
# v2.6.39
Signed-off-by: Johan Hovold
---
drivers/usb/host/ehci-tegra.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index ff9af29b4e9f..dfe2a7abc36d 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb
On Wed, Apr 22, 2015 at 12:14:05PM +0200, Jason A. Donenfeld wrote:
> Samsung has just released a portable USB3 SSD, coming in a very small
> and nice form factor. It's USB ID is 04e8:8001, which unfortunately is
> already used by the pl2303 USB serial driver and the Palm Visor driver
> for the Sam
On Wed, Apr 22, 2015 at 02:38:00PM +0200, Greg Kroah-Hartman wrote:
> On Wed, Apr 22, 2015 at 01:20:38PM +0200, Johan Hovold wrote:
> > On Wed, Apr 22, 2015 at 12:14:05PM +0200, Jason A. Donenfeld wrote:
> > > Samsung has just released a portable USB3 SSD, coming in a very sm
On Wed, Apr 22, 2015 at 02:35:09PM +0200, Jason A. Donenfeld wrote:
> Samsung has just released a portable USB3 SSD, coming in a very small
> and nice form factor. It's USB ID is 04e8:8001, which unfortunately is
> already used by the Palm Visor driver for the Samsung I330 phone cradle.
> Having pl
On Wed, Apr 22, 2015 at 04:58:44PM +0200, Greg Kroah-Hartman wrote:
> On Wed, Apr 22, 2015 at 04:20:39PM +0200, Johan Hovold wrote:
> > On Wed, Apr 22, 2015 at 02:38:00PM +0200, Greg Kroah-Hartman wrote:
> > > On Wed, Apr 22, 2015 at 01:20:38PM +0200, Johan Hovold wrote:
>
Make sure only to copy any actual data rather than the whole buffer,
when releasing the temporary buffer used for unaligned non-isochronous
transfers.
Compile-tested only.
Signed-off-by: Johan Hovold
---
drivers/usb/host/ehci-tegra.c | 12 +---
1 file changed, 9 insertions(+), 3
Make sure only to copy any actual data rather than the whole buffer,
when releasing the temporary buffer used for unaligned non-isochronous
transfers.
Signed-off-by: Johan Hovold
---
drivers/usb/musb/musb_host.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a
Make sure to copy the whole transfer buffer when releasing the temporary
buffer used for unaligned isochronous transfers as the data is not
necessarily contiguous in that case.
Signed-off-by: Johan Hovold
---
drivers/staging/octeon-usb/octeon-hcd.c | 12 +---
1 file changed, 9
).
- Drop stable tags as this is really just an optimisation.
Johan Hovold (3):
USB: musb: fix inefficient copy of unaligned buffers
USB: ehci-tegra: fix inefficient copy of unaligned buffers
staging: octeon-usb: fix unaligned isochronous transfers
drivers/staging/octeon-usb/octeon-hcd.c | 12
On Thu, Apr 23, 2015 at 04:31:51PM +0200, Frans Klaver wrote:
> On Thu, Apr 23, 2015 at 4:06 PM, Johan Hovold wrote:
> > static void free_dma_aligned_buffer(struct urb *urb)
> > {
> > struct dma_aligned_buffer *temp;
> > + size_t length;
> >
>
On Thu, Apr 23, 2015 at 02:32:26PM -0600, Stephen Warren wrote:
> On 04/23/2015 08:06 AM, Johan Hovold wrote:
> > Make sure only to copy any actual data rather than the whole buffer,
> > when releasing the temporary buffer used for unaligned non-isochronous
> > transfers.
&
On Mon, Apr 13, 2015 at 10:09:27PM +0200, Marek Belisko wrote:
> From: "H. Nikolaus Schaller"
>
> While trying to test a Cinterion GSM/GPS/3G module I had reconfigured
> the USB interface by mistake and therefore needed to run a different
> USB driver than CDC-ACM. It turned out that I need the "
Hi Mark and Lee,
On Thu, Mar 26, 2015 at 08:32:09AM +, Lee Jones wrote:
> On Wed, 25 Mar 2015, Johan Hovold wrote:
>
> > Fix broken probe of da9052 regulators, which since commit b3f6c73db732
> > ("mfd: da9052-core: Fix platform-device id collision") use a
&g
On Mon, Mar 30, 2015 at 11:32:39AM +0200, Dr. H. Nikolaus Schaller wrote:
> Hi Johan,
>
> Am 30.03.2015 um 09:45 schrieb Johan Hovold :
>
> > On Sat, Mar 28, 2015 at 02:37:57PM +0100, Marek Belisko wrote:
> >> From: "H. Nikolaus Schaller"
> >>
On Mon, Mar 30, 2015 at 11:40:20AM +0200, Dr. H. Nikolaus Schaller wrote:
> >>> diff --git a/Documentation/usb/usb-serial.txt
> >>> b/Documentation/usb/usb-serial.txt
> >>> index 947fa62..9f184d8 100644
> >>> --- a/Documentation/usb/usb-serial.txt
> >>> +++ b/Documentation/usb/usb-serial.txt
> >>
On Mon, Apr 27, 2015 at 12:54:15PM +0900, Alexandre Courbot wrote:
> On Wed, Apr 22, 2015 at 12:42 AM, Johan Hovold wrote:
> > Remove gpiod_sysfs_set_active_low (and gpio_sysfs_set_active_low) which
> > allowed code to change the polarity of a gpio line even after it had
> >
On Mon, Apr 27, 2015 at 12:54:36PM +0900, Alexandre Courbot wrote:
> On Wed, Apr 22, 2015 at 12:42 AM, Johan Hovold wrote:
> > Rename the gpio-chip export/unexport functions to the more descriptive
> > names gpiochip_register and gpiochip_unregister.
>
> Since these fun
On Mon, Apr 27, 2015 at 12:54:41PM +0900, Alexandre Courbot wrote:
> On Wed, Apr 22, 2015 at 12:42 AM, Johan Hovold wrote:
> > Clean gpio-chip class device registration and deregistration.
> >
> > The class device is registered when a gpio-chip is added (or from
> > g
On Mon, Apr 27, 2015 at 05:50:54PM +0900, Alexandre Courbot wrote:
> On Mon, Apr 27, 2015 at 5:27 PM, Johan Hovold wrote:
> > On Mon, Apr 27, 2015 at 12:54:36PM +0900, Alexandre Courbot wrote:
> >> On Wed, Apr 22, 2015 at 12:42 AM, Johan Hovold wrote:
> >> > Rename
On Mon, Apr 27, 2015 at 01:00:50PM +0200, Niklas Cassel wrote:
> Since NULL is a valid clock, we shouldn't use
> IS_ERR_OR_NULL.
>
> Implemented as Russell King suggested in:
>
> http://lkml.kernel.org/r/20150207172949.ge8...@n2100.arm.linux.org.uk
>
> Signed-off-by: Niklas Cassel
> ---
> driv
On Mon, Apr 27, 2015 at 01:05:17PM +0200, Johan Hovold wrote:
> On Mon, Apr 27, 2015 at 01:00:50PM +0200, Niklas Cassel wrote:
> > Since NULL is a valid clock, we shouldn't use
> > IS_ERR_OR_NULL.
> >
> > Implemented as Russell King suggested in:
> >
>
On Tue, Apr 28, 2015 at 12:27:16PM +0900, Alexandre Courbot wrote:
> On Mon, Apr 27, 2015 at 6:05 PM, Johan Hovold wrote:
> > On Mon, Apr 27, 2015 at 05:50:54PM +0900, Alexandre Courbot wrote:
> >> On Mon, Apr 27, 2015 at 5:27 PM, Johan Hovold wrote:
> >> > On M
On Tue, Apr 07, 2015 at 11:30:15AM -0400, Alan Stern wrote:
> On Tue, 7 Apr 2015, Johan Hovold wrote:
>
> > Make sure only to copy any actual data rather than the whole buffer,
> > when releasing the temporary buffer used for unaligned transfer buffers.
> >
> > Note
On Tue, Apr 14, 2015 at 03:04:06PM +0200, Johan Hovold wrote:
> Hi Mark and Lee,
>
> On Thu, Mar 26, 2015 at 08:32:09AM +, Lee Jones wrote:
> > On Wed, 25 Mar 2015, Johan Hovold wrote:
> >
> > > Fix broken probe of da9052 regulators, which since commit b3f6c73
On Wed, Apr 22, 2015 at 04:30:12PM +0200, Johan Hovold wrote:
> On Wed, Apr 22, 2015 at 02:35:09PM +0200, Jason A. Donenfeld wrote:
> > Samsung has just released a portable USB3 SSD, coming in a very small
> > and nice form factor. It's USB ID is 04e8:8001, which unfortunately
On Wed, Apr 29, 2015 at 11:44:18PM +0200, Linus Walleij wrote:
> On Tue, Apr 21, 2015 at 5:42 PM, Johan Hovold wrote:
>
> > Unregister GPIOs requested through sysfs at chip remove to avoid leaking
> > the associated memory and sysfs entries.
> >
> > The stale sy
On Wed, Apr 29, 2015 at 11:48:57PM +0200, Linus Walleij wrote:
> On Tue, Apr 21, 2015 at 5:42 PM, Johan Hovold wrote:
>
> > Drop redundant lock-as-irq in gpio_setup_irq, which has already been
> > handled when requesting and releasing the irq (i.e. in the irq chip
> > i
/sys/bus/usb-serial/drivers/generic/new_id
>
> This patch changes the documentation file to describe the modern variant.
> Please note that the old one still works (if compiled as module).
>
> Signed-off-by: H. Nikolaus Schaller
> Signed-off-by: Marek Belisko
> ---
>
On Tue, Apr 21, 2015 at 01:57:05PM +0200, Bjørn Mork wrote:
> Johan Hovold writes:
> > On Mon, Apr 20, 2015 at 10:15:20PM +0200, Marek Belisko wrote:
> >> From: "H. Nikolaus Schaller"
> >>
> >> The parameters vendor= and product= are only
no need to hold the sysfs lock when releasing the irq
after the class device is gone as kernfs will prevent further attribute
operations.
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib-sysfs.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpio/gpiolib
le at
least) without losing our sanity.
Note that there is still a race between chip remove and gpiod_request (and
therefore sysfs export), which needs to be fixed separately (for instance as
part of a generic solution to chip hotplugging).
Johan
Johan Hovold (23):
gpio: sysfs: fix memory leak
Remove FLAG_SYSFS_DIR, which is sysfs-interface specific, and store it
in the class-device data instead.
Note that the flag is only used during export.
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib-sysfs.c | 15 +++
drivers/gpio/gpiolib.h | 1 -
2 files changed, 7
Only call irq helper if actually reconfiguring interrupt state.
This is a preparatory step in introducing separate gpio-irq request and
free functions.
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib-sysfs.c | 19 ++-
1 file changed, 14 insertions(+), 5 deletions(-)
diff
Store the value sysfs entry in the gpiod data rather than in a global
table accessed through an index stored in the overloaded gpio-descriptor
flag field.
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib-sysfs.c | 54 +++-
drivers/gpio/gpiolib.h
Add separate helper functions for irq request and free.
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib-sysfs.c | 72 ++--
1 file changed, 36 insertions(+), 36 deletions(-)
diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c
Remove redundant gpio-descriptor parameters from sysfs_set_active_low and
gpio_setup_irq.
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib-sysfs.c | 24 +++-
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio
Move irq trigger flags, which as sysfs-interface specific, to the class
device data.
This avoids accessing the gpio-descriptor flags field using non-atomic
operations without any locking, and allows for a more clear separation
of the sysfs interface from gpiolib core.
Signed-off-by: Johan Hovold
Use DEVICE_ATTR_RO and DEVICE_ATTR_RW rather than specifying masks and
callbacks directly.
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib-sysfs.c | 43 ++-
1 file changed, 18 insertions(+), 25 deletions(-)
diff --git a/drivers/gpio/gpiolib-sysfs.c
.
Note that this is also needed to fix a race between gpiod_export and
gpiod_unexport.
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib-sysfs.c | 52 +---
1 file changed, 34 insertions(+), 18 deletions(-)
diff --git a/drivers/gpio/gpiolib-sysfs.c b
lookup on deregistration. This also removes the need for
the exported flag.
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib-sysfs.c | 39 +--
include/linux/gpio/driver.h | 4 ++--
2 files changed, 15 insertions(+), 28 deletions(-)
diff --git a/drivers
Reduce scope of sysfs_lock protection during chip export and unexport,
which is only needed to prevent gpiod (re-)exports during chip removal.
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib-sysfs.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpio
exporting the gpio.
There are no in-kernel users of this interface.
Cc: Jonathan Corbet
Cc: Harry Wei
Cc: Arnd Bergmann
Cc: linux-...@vger.kernel.org
Cc: linux-ker...@zh-kernel.org
Cc: linux-a...@vger.kernel.org
Signed-off-by: Johan Hovold
---
Documentation/gpio/gpio-legacy.txt | 9
Put the recently introduced gpio-chip pointer to some more use in
gpiod_export.
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib-sysfs.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c
index d87f595a02ce
Add gpiod class-device data.
This is a first step in getting rid of the insane gpio-descriptor flag
overloading, backward irq-interface implementation, and course grained
sysfs-interface locking (a single static mutex for every operation on
all exported gpios in a system).
Signed-off-by: Johan
Rename active-low helper using common prefix.
Also remove unnecessary manipulation of value argument.
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib-sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c
Rename the gpio-chip export/unexport functions to the more descriptive
names gpiochip_register and gpiochip_unregister.
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib-sysfs.c | 13 +++--
drivers/gpio/gpiolib.c | 4 ++--
drivers/gpio/gpiolib.h | 8
3 files
Remove goto from success path.
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib-sysfs.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c
index 323272569292..761e1644cff1 100644
--- a/drivers/gpio
operations to drain during deregistration.
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib-sysfs.c | 51 ++--
1 file changed, 26 insertions(+), 25 deletions(-)
diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c
index 19c4351021d9
The attribute operations will never be called for an unregistered device
so remove redundant checks for FLAG_EXPORT.
Note that kernfs will also guarantee that any active sysfs operation has
finished before the attribute is removed during deregistration.
Signed-off-by: Johan Hovold
---
drivers
Drop unnecessary locking from gpiod_export_link. If the class device has
not already been unregistered, class_find_device returns the ref-counted
class device so there's no need for locking.
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib-sysfs.c | 28
1
) explicit call ever failed.
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib-sysfs.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c
index af3bc7a8033b..d87f595a02ce 100644
--- a/drivers/gpio/gpiolib-sysfs.c
+++ b/drivers/gpio
Clean up gpiochip_remove somewhat and only output warning about removing
chip with GPIOs requested once.
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
on pre-3.14 kernels (prior to
kernfs).
Fixes: d8f388d8dc8d ("gpio: sysfs interface")
Cc: stable # v2.6.27: 01cca93a9491
Signed-off-by: Johan Hovold
---
drivers/gpio/gpiolib-sysfs.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/drivers/gpio/gpiolib-sysfs.c
On Fri, Jun 12, 2015 at 09:32:31AM +0200, Claudio Cappelli wrote:
> On Wednesday 10 June 2015 20:38:30 Claudio Cappelli wrote:
> > From: Claudio Cappelli
> >
> > Add device Olivetti Olicard 300 (Network Connect: MT6225) - IDs 2020:4000.
> >
> > Signed-off-by: Claudio Cappelli
> > Suggested-by:
[ Responding to the review request with lkml on CC as well. ]
On Fri, Jun 19, 2015 at 01:36:35PM -0700, Greg Kroah-Hartman wrote:
> 3.14-stable review patch. If anyone has any objections, please let me know.
This one can be dropped from 3.14-stable as it is only needed in 3.19
and later kernels
On Sun, Jun 21, 2015 at 12:12:55AM +0200, Stefan Agner wrote:
> Yet another FTDI GPIO patchset. Yet somewhat different to previous
> implementations...
>
> There are three GPIO modes supported by FTDI devices:
> 1. Asynchronous Bit Bang Mode (used in Sacha's patch)
> 2. Synchronous Bit Bang Mode (
On Mon, Jun 22, 2015 at 10:11:35PM +0200, Stefan Agner wrote:
> On 2015-06-22 19:26, Johan Hovold wrote:
> > Instead, hang the gpio chip directly off the usb interface (not the
> > port), add a new config option, and keep the gpio implementation under
> > drivers/usb/serial
On Thu, Jun 18, 2015 at 05:47:50PM +0530, Sudip Mukherjee wrote:
> While building with mn10300 it failed with:
> error: expected identifier before '(' token
> #define __SYSREG(ADDR, TYPE) (*(volatile TYPE *)(ADDR))
> note: in expansion of macro '__SYSREG'
> #define DCR __SYSREG(0xc030, u16)
501 - 600 of 2824 matches
Mail list logo