Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1340497 > unrolled thread

Re: [PATCHv2 3/4] ARM: tegra: use build-in device properties with rfkill_gpio

Started byArnd Bergmann <arnd@arndb.de>
First post2016-02-23 11:20 +0100
Last post2016-02-23 21:40 +0100
Articles 7 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCHv2 3/4] ARM: tegra: use build-in device properties with rfkill_gpio Arnd Bergmann <arnd@arndb.de> - 2016-02-23 11:20 +0100
    Re: [PATCHv2 3/4] ARM: tegra: use build-in device properties with rfkill_gpio Arnd Bergmann <arnd@arndb.de> - 2016-02-23 11:40 +0100
      Re: [PATCHv2 3/4] ARM: tegra: use build-in device properties with rfkill_gpio Marc Dietrich <marvin24@gmx.de> - 2016-02-23 11:40 +0100
        Re: [PATCHv2 3/4] ARM: tegra: use build-in device properties with rfkill_gpio Arnd Bergmann <arnd@arndb.de> - 2016-02-23 14:20 +0100
          Re: [PATCHv2 3/4] ARM: tegra: use build-in device properties with rfkill_gpio Marc Dietrich <marvin24@gmx.de> - 2016-02-23 14:50 +0100
            Re: [PATCHv2 3/4] ARM: tegra: use build-in device properties with rfkill_gpio Arnd Bergmann <arnd@arndb.de> - 2016-02-23 16:10 +0100
              Re: [PATCHv2 3/4] ARM: tegra: use build-in device properties with  rfkill_gpio Johannes Berg <johannes@sipsolutions.net> - 2016-02-23 21:40 +0100

#1340497 — Re: [PATCHv2 3/4] ARM: tegra: use build-in device properties with rfkill_gpio

FromArnd Bergmann <arnd@arndb.de>
Date2016-02-23 11:20 +0100
SubjectRe: [PATCHv2 3/4] ARM: tegra: use build-in device properties with rfkill_gpio
Message-ID<r5ieu-3Qp-15@gated-at.bofh.it>
On Thursday 18 February 2016 21:04:49 Johannes Berg wrote:
> On Tue, 2016-01-26 at 09:42 +0100, Johannes Berg wrote:
> > On Mon, 2016-01-25 at 13:18 +0100, Thierry Reding wrote:
> > >  
> > > Johannes, I assume that you'll want to take this through your tree
> > > because of the dependency? In that case:
> > > 
> > > Acked-by: Thierry Reding <treding@nvidia.com>
> > 
> > I can, but I don't really care - perhaps you'd rather take the entire
> > series through your tree to get it into one place for Marc?
> > 
> > In which case, you have my
> > 
> > Acked-by: Johannes Berg <johannes@sipsolutions.net>
> > 
> > for the other 3 patches.
> > 
> > Let me know which you prefer.
> > 
> Did these patches get applied anywhere? Otherwise I'm willing to pick
> them up.
> 

Fine with me too:

Acked-by: Arnd Bergmann <arnd@arndb.de>

Just for my curiosity: what is the difference between a rfkill-gpio
device and a gpio-keys device with a KEY_RFKILL code?

arch/arm/boot/dts/bcm4708-netgear-r6250.dts and others seem to
do the second approach in DT so they don't need to create the
platform device.

	Arnd

[toc] | [next] | [standalone]


#1340504

FromArnd Bergmann <arnd@arndb.de>
Date2016-02-23 11:40 +0100
Message-ID<r5ixQ-3Z2-9@gated-at.bofh.it>
In reply to#1340497
On Tuesday 23 February 2016 11:15:31 Arnd Bergmann wrote:
> On Thursday 18 February 2016 21:04:49 Johannes Berg wrote:
> > On Tue, 2016-01-26 at 09:42 +0100, Johannes Berg wrote:

> Just for my curiosity: what is the difference between a rfkill-gpio
> device and a gpio-keys device with a KEY_RFKILL code?
> 
> arch/arm/boot/dts/bcm4708-netgear-r6250.dts and others seem to
> do the second approach in DT so they don't need to create the
> platform device.

I found the answer now (after discussing on IRC): just
for reference: KEY_RFKILL is for sending the event to the kernel
when a user presses the gpio butting, this rfkill-gpio turns
the devices on or off when after an RFKILL event is received.

	Arnd

[toc] | [prev] | [next] | [standalone]


#1340505

FromMarc Dietrich <marvin24@gmx.de>
Date2016-02-23 11:40 +0100
Message-ID<r5ixQ-3Z2-13@gated-at.bofh.it>
In reply to#1340504

[Multipart message — attachments visible in raw view] — view raw

Am Dienstag, 23. Februar 2016, 11:31:40 CET schrieb Arnd Bergmann:
> On Tuesday 23 February 2016 11:15:31 Arnd Bergmann wrote:
> > On Thursday 18 February 2016 21:04:49 Johannes Berg wrote:
> > > On Tue, 2016-01-26 at 09:42 +0100, Johannes Berg wrote:
> > Just for my curiosity: what is the difference between a rfkill-gpio
> > device and a gpio-keys device with a KEY_RFKILL code?
> > 
> > arch/arm/boot/dts/bcm4708-netgear-r6250.dts and others seem to
> > do the second approach in DT so they don't need to create the
> > platform device.
> 
> I found the answer now (after discussing on IRC): just
> for reference: KEY_RFKILL is for sending the event to the kernel
> when a user presses the gpio butting, this rfkill-gpio turns
> the devices on or off when after an RFKILL event is received.

yes, paz00 has no hw key. rfkill is triggered via software (rfkill) only. The 
problem in the past was how to describe such a device in the device tree. 

Strictly speaking, there is no rfkill device hardware (just an interface). The 
only hardware that exists is in our case is connected to a hard wired usb bus 
(wifi dongle), which makes it complicated to attach a DT property or subdevice 
to it. And a standalone device-tree entry for a non hardware device was 
rejected in the past.

Marc

[toc] | [prev] | [next] | [standalone]


#1340602

FromArnd Bergmann <arnd@arndb.de>
Date2016-02-23 14:20 +0100
Message-ID<r5l2G-5VT-17@gated-at.bofh.it>
In reply to#1340505
On Tuesday 23 February 2016 11:38:52 Marc Dietrich wrote:
> Am Dienstag, 23. Februar 2016, 11:31:40 CET schrieb Arnd Bergmann:
> > On Tuesday 23 February 2016 11:15:31 Arnd Bergmann wrote:
> > > On Thursday 18 February 2016 21:04:49 Johannes Berg wrote:
> > > > On Tue, 2016-01-26 at 09:42 +0100, Johannes Berg wrote:
> > > Just for my curiosity: what is the difference between a rfkill-gpio
> > > device and a gpio-keys device with a KEY_RFKILL code?
> > > 
> > > arch/arm/boot/dts/bcm4708-netgear-r6250.dts and others seem to
> > > do the second approach in DT so they don't need to create the
> > > platform device.
> > 
> > I found the answer now (after discussing on IRC): just
> > for reference: KEY_RFKILL is for sending the event to the kernel
> > when a user presses the gpio butting, this rfkill-gpio turns
> > the devices on or off when after an RFKILL event is received.
> 
> yes, paz00 has no hw key. rfkill is triggered via software (rfkill) only. The 
> problem in the past was how to describe such a device in the device tree. 
> 
> Strictly speaking, there is no rfkill device hardware (just an interface). The 
> only hardware that exists is in our case is connected to a hard wired usb bus 
> (wifi dongle), which makes it complicated to attach a DT property or subdevice 
> to it. And a standalone device-tree entry for a non hardware device was 
> rejected in the past.
> 

Ah, so the problem of attaching DT properties to a USB device has recently
been solved, see subject "USB: core: let USB device know device node".

Would that work for you? With this, the USB driver can simply look at
the optional DT properties of the USB function to implement its rfkill
callbacks.

	Arnd

[toc] | [prev] | [next] | [standalone]


#1340628

FromMarc Dietrich <marvin24@gmx.de>
Date2016-02-23 14:50 +0100
Message-ID<r5lvJ-69z-51@gated-at.bofh.it>
In reply to#1340602

[Multipart message — attachments visible in raw view] — view raw

Am Dienstag, 23. Februar 2016, 14:17:17 CET schrieb Arnd Bergmann:
> On Tuesday 23 February 2016 11:38:52 Marc Dietrich wrote:
> > Am Dienstag, 23. Februar 2016, 11:31:40 CET schrieb Arnd Bergmann:
> > > On Tuesday 23 February 2016 11:15:31 Arnd Bergmann wrote:
> > > > On Thursday 18 February 2016 21:04:49 Johannes Berg wrote:
> > > > > On Tue, 2016-01-26 at 09:42 +0100, Johannes Berg wrote:
> > > > Just for my curiosity: what is the difference between a rfkill-gpio
> > > > device and a gpio-keys device with a KEY_RFKILL code?
> > > > 
> > > > arch/arm/boot/dts/bcm4708-netgear-r6250.dts and others seem to
> > > > do the second approach in DT so they don't need to create the
> > > > platform device.
> > > 
> > > I found the answer now (after discussing on IRC): just
> > > for reference: KEY_RFKILL is for sending the event to the kernel
> > > when a user presses the gpio butting, this rfkill-gpio turns
> > > the devices on or off when after an RFKILL event is received.
> > 
> > yes, paz00 has no hw key. rfkill is triggered via software (rfkill) only.
> > The problem in the past was how to describe such a device in the device
> > tree.
> > 
> > Strictly speaking, there is no rfkill device hardware (just an interface).
> > The only hardware that exists is in our case is connected to a hard wired
> > usb bus (wifi dongle), which makes it complicated to attach a DT property
> > or subdevice to it. And a standalone device-tree entry for a non hardware
> > device was rejected in the past.
> 
> Ah, so the problem of attaching DT properties to a USB device has recently
> been solved, see subject "USB: core: let USB device know device node".
> 
> Would that work for you? With this, the USB driver can simply look at
> the optional DT properties of the USB function to implement its rfkill
> callbacks.

oh, that looks indeed interesting. The question is now if rfkill is a property 
of a device or a subdevice itself. The latter one would only require addition 
of device-tree instantiation of rfkill, while with the former one, the (or 
all) usb driver(s) need to be modified to accept device tree properties, 
especially gpios. The driver would then be responsible to add an rfkill 
"device".

IMHO (and unfortunately), it's just a property (a way to specify the relevant 
gpios), making the solution again hard to archive.

Marc

[toc] | [prev] | [next] | [standalone]


#1340737

FromArnd Bergmann <arnd@arndb.de>
Date2016-02-23 16:10 +0100
Message-ID<r5mL8-7at-15@gated-at.bofh.it>
In reply to#1340628
On Tuesday 23 February 2016 14:42:55 Marc Dietrich wrote:
> Am Dienstag, 23. Februar 2016, 14:17:17 CET schrieb Arnd Bergmann:
> > On Tuesday 23 February 2016 11:38:52 Marc Dietrich wrote:
> > > Am Dienstag, 23. Februar 2016, 11:31:40 CET schrieb Arnd Bergmann:
> > Ah, so the problem of attaching DT properties to a USB device has recently
> > been solved, see subject "USB: core: let USB device know device node".
> > 
> > Would that work for you? With this, the USB driver can simply look at
> > the optional DT properties of the USB function to implement its rfkill
> > callbacks.
> 
> oh, that looks indeed interesting. The question is now if rfkill is a property 
> of a device or a subdevice itself. The latter one would only require addition 
> of device-tree instantiation of rfkill, while with the former one, the (or 
> all) usb driver(s) need to be modified to accept device tree properties, 
> especially gpios. The driver would then be responsible to add an rfkill 
> "device".
> 
> IMHO (and unfortunately), it's just a property (a way to specify the relevant 
> gpios), making the solution again hard to archive.

Does rfkill always have a separate device in the Linux driver model?

I would say that if we standardize on the property names, we can
have some generic helper code that does everything with one or
two function calls, similar to how we can read a mac address from
a DT node from ROM-less USB ethernet devices.

	Arnd

[toc] | [prev] | [next] | [standalone]


#1341010 — Re: [PATCHv2 3/4] ARM: tegra: use build-in device properties with rfkill_gpio

FromJohannes Berg <johannes@sipsolutions.net>
Date2016-02-23 21:40 +0100
SubjectRe: [PATCHv2 3/4] ARM: tegra: use build-in device properties with rfkill_gpio
Message-ID<r5rUu-29C-11@gated-at.bofh.it>
In reply to#1340737
On Tue, 2016-02-23 at 16:06 +0100, Arnd Bergmann wrote:
> 
> Does rfkill always have a separate device in the Linux driver model?

Yes, the rfkill core code registers and adds one in the rfkill class.

> johannes

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web