Re: [PATCH 2/2] usb/ftdi_sio: Add support for setting CBUS pins on FT232H

From: Greg KH
Date: Sat May 31 2014 - 22:31:38 EST


On Sun, Jun 01, 2014 at 02:14:27AM +0200, Philipp Hachtmann wrote:
> On 01.06.2014 02:00, Peter Stuge wrote:
> >Philipp Hachtmann wrote:
> >>This patch adds a sysfs attribute "cbus" which allows to set the
> >>four CBUS pins on the FT232H.
> >
> >I think this should be implemented with the gpio subsystem instead.
> The GPIO subsystem seems to be made for GPIO pins connected directly to the
> computer. The Beaglebone with its AM335x SoC seems to be a good example of
> a computer with many GPIOs in the sense of the GPIO subsystem.
> And the GPIO pins have fixed unique numbers. No, I don't think that the GPIO
> subsystem has anything to do with the additional pins on some USB device.
> Please correct me if I'm completely wrong.

As they are GPIO pins on this device, it should be the subsystem that
controls it. That way, userspace programs that are used to talk to a
GPIO device will "just work", and not have to be customized just for
this specific device and sysfs file.

So please use the GPIO subsystem instead of creating your own interface.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/