Re: [PATCH RFC] spidev.c: add sysfs attributes for SPI configuration

2012-12-22 Thread Greg KH
On Sat, Dec 22, 2012 at 12:21:15PM +0100, Federico Vaga wrote: > > I'm cautious about adding operational interfaces to sysfs because it > > can be quite difficult to get the locking right. To begin with it > > splits up a single interface into multiple files, any of which can > > be held open by a

Re: [PATCH RFC] spidev.c: add sysfs attributes for SPI configuration

2012-12-22 Thread Federico Vaga
> I'm cautious about adding operational interfaces to sysfs because it > can be quite difficult to get the locking right. To begin with it > splits up a single interface into multiple files, any of which can > be held open by a process. Then there is the question of ordering > of operations when

Re: [PATCH RFC] spidev.c: add sysfs attributes for SPI configuration

2012-12-22 Thread Grant Likely
On Thu, 20 Dec 2012 16:30:36 +0100, Federico Vaga wrote: > On Wednesday 19 December 2012 15:09:25 Grant Likely wrote: > > Not a good idea. sysfs is not a good place for operational > > interfaces. Please use the spi character devices for direct > > manipulation of the SPI configuration. > >

Re: [PATCH RFC] spidev.c: add sysfs attributes for SPI configuration

2012-12-22 Thread Grant Likely
On Thu, 20 Dec 2012 16:30:36 +0100, Federico Vaga federico.v...@gmail.com wrote: On Wednesday 19 December 2012 15:09:25 Grant Likely wrote: Not a good idea. sysfs is not a good place for operational interfaces. Please use the spi character devices for direct manipulation of the SPI

Re: [PATCH RFC] spidev.c: add sysfs attributes for SPI configuration

2012-12-22 Thread Federico Vaga
I'm cautious about adding operational interfaces to sysfs because it can be quite difficult to get the locking right. To begin with it splits up a single interface into multiple files, any of which can be held open by a process. Then there is the question of ordering of operations when there

Re: [PATCH RFC] spidev.c: add sysfs attributes for SPI configuration

2012-12-22 Thread Greg KH
On Sat, Dec 22, 2012 at 12:21:15PM +0100, Federico Vaga wrote: I'm cautious about adding operational interfaces to sysfs because it can be quite difficult to get the locking right. To begin with it splits up a single interface into multiple files, any of which can be held open by a

Re: [PATCH RFC] spidev.c: add sysfs attributes for SPI configuration

2012-12-20 Thread Federico Vaga
On Wednesday 19 December 2012 15:09:25 Grant Likely wrote: > Not a good idea. sysfs is not a good place for operational > interfaces. Please use the spi character devices for direct > manipulation of the SPI configuration. Hello, Can you explain why it is not a good idea? I do not understand;

Re: [PATCH RFC] spidev.c: add sysfs attributes for SPI configuration

2012-12-20 Thread Federico Vaga
On Wednesday 19 December 2012 15:09:25 Grant Likely wrote: Not a good idea. sysfs is not a good place for operational interfaces. Please use the spi character devices for direct manipulation of the SPI configuration. Hello, Can you explain why it is not a good idea? I do not understand; what

Re: [PATCH RFC] spidev.c: add sysfs attributes for SPI configuration

2012-12-19 Thread Grant Likely
On Sat, 24 Nov 2012 18:20:08 +0100, Federico Vaga wrote: > This patch introduce the use of the sysfs attribute for the spidev > configuration. This avoid the user to have a specific program which does > ioctl() on spidev. The user can easily does cat (to read) and echo (to > write) on the sysfs

Re: [PATCH RFC] spidev.c: add sysfs attributes for SPI configuration

2012-12-19 Thread Grant Likely
On Sat, 24 Nov 2012 18:20:08 +0100, Federico Vaga federico.v...@gmail.com wrote: This patch introduce the use of the sysfs attribute for the spidev configuration. This avoid the user to have a specific program which does ioctl() on spidev. The user can easily does cat (to read) and echo (to