From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754078AbcBWPHW (ORCPT ); Tue, 23 Feb 2016 10:07:22 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:54288 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753129AbcBWPHR (ORCPT ); Tue, 23 Feb 2016 10:07:17 -0500 From: Arnd Bergmann To: Marc Dietrich Cc: Johannes Berg , Thierry Reding , Heikki Krogerus , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, Alexandre Courbot , Stephen Warren Subject: Re: [PATCHv2 3/4] ARM: tegra: use build-in device properties with rfkill_gpio Date: Tue, 23 Feb 2016 16:06:55 +0100 Message-ID: <3466361.DVRahbqhfF@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <2927215.6IlWnjRTgT@fb07-iapwap2> References: <1453712629-143317-1-git-send-email-heikki.krogerus@linux.intel.com> <2463567.tt0f0ingYr@wuerfel> <2927215.6IlWnjRTgT@fb07-iapwap2> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:hlDn8TSK7CSjBZL1kEVXC053nFMU3uhM+R8aVfXto0rAV/czVhs pZ6itXENW4nd8l6Si8vIBwpjPwRGJU46xYbfyYI57u8r6B3dNScgP8/zDTLQaS9zbBWxkyx j+LkUrIiewvLu48W9Xq6RCAWlZsE+ax2fXlL3HhyGgC3UTGGKuGGJzRG2Ga6oQjFruUMZFy G3LGvckld0gfIiFOa2i6g== X-UI-Out-Filterresults: notjunk:1;V01:K0:fiNpNWQtdII=:Cbi4jIj9HmDO3o869KkglM +TYzO7GQU5zRoo8qCbyLiWhJX4Cq5U4iLzTjfhzEvvg7KqvQgnlloxRRdVQW++KsErqPEEfrs 4UJ/5iZ2Ijhc60hP6+OijXs5P3kz8h1T+2qnrWUvCgXD+JshFcjd0dg4VflV85uYQaLsHo2vE ZCsR2CjMhlNym2ojOFxwBaYFaatvRvFjoFWV9izxV6pM/n8CW5a3Lc5Z+vZTMh07m9Xvo3jDx pGwXvb4cvB/it/y93t8uI8ogIddjGGsgWuz/7qtFN1f6+0VmMDAHHSb9JUEz2ZqYnd5uoTg1h XYsQ10C2nzNW/PZkMQteGyng8zbdyGaE0fr4R0h2Y7Yg/YRqfpmTUOFdWzJOIPJ7uM6BuSjPi T1zibQ1hLz25UrQmTkSU4E5mOUyonmBGx8YHWFOvGmYHtp/rZlhh7Q5RRtUJNonsGt68ji5E/ WZSLev0FvCwoo3trNJx14sUMWKLw/mh5gBCB4N6+hXz/ovYS80heLgpTIZglnkF3/Hw5P9XHS Bc6o7k5eNgZb6dKXyFHhUF0HJDZ0SvY0g8Gf7gmraqePFi6rVWHXdSbNscdqa6YmzDHy6ww9g 8co+2ZCLWtO04gOnoZRq6IwOPVWEUP1LYbsXAv0mWMLGB+A6GI/AItck2lyR6aG+oXTnLUWWn WN6ZMGLPbU1wKmA7vi2UmPE/WIQdugViF/5ep7MBu0gjjkriqFm2OFWOINLG+82iz/6eCQJR3 5iqGn+7V3tZDRlPf Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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