linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>,
	Sekhar Nori <nsekhar@ti.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Johan Hovold <johan@kernel.org>
Subject: Re: [PATCH 2/2] gpiolib: assign chip owner to dev->driver->owner if not set
Date: Thu, 16 Jul 2015 14:53:17 +0300	[thread overview]
Message-ID: <55A79B2D.2080900@ti.com> (raw)
In-Reply-To: <CACRpkdbiLmx6EuL8o1=RgrbMMfagbXHPK2VjrkNons6E=mm8bA@mail.gmail.com>

On 07/16/2015 02:25 PM, Linus Walleij wrote:
> On Thu, Jul 16, 2015 at 1:22 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
>> On Thu, Jun 25, 2015 at 7:30 PM, Grygorii Strashko
>> <grygorii.strashko@ti.com> wrote:
>>
>>> Assign GPIO chip owner field to chip->dev->driver->owner if it was not
>>> configured by GPIO driver.
>>>
>>> Cc: Johan Hovold <johan@kernel.org>
>>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>>
>> Patch applied with Alex' review tag.
>>
>>>   There is also one positive additional side effect:
>>>   lines like below can be removed from a lot of GPIO
>>>   drivers
>>>          rdc321x_gpio_dev->chip.owner = THIS_MODULE;
>>
>> Yes let's do this :)
>
> Or actually, I have had some second thought to why gpio_chip
> is duplicating struct members from struct device at all.
>
> Why should it even have "owner" and "of_node"?
>
> Should we not just rewrite this code to follow the struct device *dev
> pointer in gpio_chip and use "owner" and "of_node" from there?
>

Seems not all drivers implemented using Dev/Driver approach,
so they don't have dev at all ;)

gpio-samsung.c for example (non-DT driver).


-- 
regards,
-grygorii

  reply	other threads:[~2015-07-16 11:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-25 17:30 [PATCH 1/2] gpiolib: irqchip: prevent driver unloading if gpio is used as irq only Grygorii Strashko
2015-06-25 17:30 ` [PATCH 2/2] gpiolib: assign chip owner to dev->driver->owner if not set Grygorii Strashko
2015-06-30 13:41   ` Alexandre Courbot
2015-07-16 11:22   ` Linus Walleij
2015-07-16 11:25     ` Linus Walleij
2015-07-16 11:53       ` Grygorii Strashko [this message]
2015-06-30 13:47 ` [PATCH 1/2] gpiolib: irqchip: prevent driver unloading if gpio is used as irq only Alexandre Courbot
2015-07-16 11:20 ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55A79B2D.2080900@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=gnurou@gmail.com \
    --cc=johan@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nsekhar@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).