From: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-watchdog@vger.kernel.org,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
kernel <kernel@savoirfairelinux.com>,
Mark Featherston <mark@embeddedarm.com>,
kris@embeddedarm.com, Simon Horman <horms+renesas@verge.net.au>,
Thierry Reding <treding@nvidia.com>,
Jon Hunter <jonathanh@nvidia.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Fabio Estevam <fabio.estevam@nxp.com>,
Sascha Hauer <kernel@pengutronix.de>,
Shawn Guo <shawnguo@kernel.org>,
Russell King <linux@armlinux.org.uk>,
Guenter Roeck <linux@roeck-us.net>,
Wim Van Sebroeck <wim@iguana.be>,
Mark Rutland <mark.rutland@arm.com>,
Rob Herring <robh+dt@kernel.org>,
damien.riegel@savoirfairelinux.com,
Lucile Quirion <lucile.quirion@savoirfairelinux.com>,
Olof Johansson <olof@lixom.net>, Arnd Bergmann <arnd@arndb.de>,
"Suzuki K. Poulose" <suzuki.poulose@arm.com>,
Will Deacon <will.deacon@arm.com>,
Masahiro Yamada <yamada.masahiro@socionext.com>
Subject: Re: [PATCH 4/6] bus: add driver for the Technologic Systems NBUS
Date: Fri, 3 Feb 2017 10:56:34 -0500 [thread overview]
Message-ID: <3f3cd438-63dc-dea8-e17b-7eb3e588cc36@savoirfairelinux.com> (raw)
In-Reply-To: <CACRpkdbAYyxTOq_ZAwjSJAhCbrzTaUMSG9N7t8Wq1ifTDFBLrQ@mail.gmail.com>
Hi Linus,
On 02/03/2017 08:51 AM, Linus Walleij wrote:
> Your child nodes I guess will be instatiated as devices as well.
>
> These devices will have the NBUS driver as .parent in their
> struct device I guess. Else the design of this bus is tilted.
>
> If the NBUS driver use dev_set_drvdata(dev, state_container_cookie)
> the children can use dev_get_drvdata(dev->parent); to get a pointer to
> the same cookie.
>
> The subdrivers don't even need to know the members of the state
> container as long as you're just passing a pointer to it. It's
> enough if you forward-declare it as a "pointer to some struct":
>
> struct foo;
>
> {
> struct foo *fooptr = dev_get_drvdata(dev->parent);
> write(fooptr, 0x10);
>
> etc
Thanks a lot, this is perfect!
Best Regards,
Sebastien.
next prev parent reply other threads:[~2017-02-03 15:56 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-14 23:12 [PATCH 0/6] Add board support for TS-4600 Sebastien Bourdelin
2016-12-14 23:12 ` [PATCH 1/6] of: documentation: add bindings documentation " Sebastien Bourdelin
2016-12-19 22:05 ` Rob Herring
2016-12-14 23:12 ` [PATCH 2/6] ARM: dts: TS-4600: add basic device tree Sebastien Bourdelin
2016-12-14 23:12 ` [PATCH 3/6] dt-bindings: bus: Add documentation for the Technologic Systems NBUS Sebastien Bourdelin
2016-12-19 22:12 ` Rob Herring
2016-12-14 23:12 ` [PATCH 4/6] bus: add driver " Sebastien Bourdelin
2016-12-30 7:58 ` Linus Walleij
2017-02-01 19:56 ` Sebastien Bourdelin
2017-02-03 13:51 ` Linus Walleij
2017-02-03 15:56 ` Sebastien Bourdelin [this message]
2016-12-14 23:12 ` [PATCH 5/6] ARM: dts: TS-4600: add NBUS support Sebastien Bourdelin
2016-12-30 8:01 ` Linus Walleij
2016-12-14 23:12 ` [PATCH 6/6] watchdog: ts4600: add driver for TS-4600 watchdog Sebastien Bourdelin
2016-12-15 10:28 ` kbuild test robot
2016-12-19 22:13 ` Rob Herring
2016-12-23 1:53 ` Guenter Roeck
2016-12-14 23:12 ` [PATCH 2/6] ARM: dts: TS-4600: add basic device tree Sebastien Bourdelin
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=3f3cd438-63dc-dea8-e17b-7eb3e588cc36@savoirfairelinux.com \
--to=sebastien.bourdelin@savoirfairelinux.com \
--cc=arnd@arndb.de \
--cc=damien.riegel@savoirfairelinux.com \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=fabio.estevam@nxp.com \
--cc=horms+renesas@verge.net.au \
--cc=jonathanh@nvidia.com \
--cc=kernel@pengutronix.de \
--cc=kernel@savoirfairelinux.com \
--cc=kris@embeddedarm.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=linux@roeck-us.net \
--cc=lucile.quirion@savoirfairelinux.com \
--cc=mark.rutland@arm.com \
--cc=mark@embeddedarm.com \
--cc=olof@lixom.net \
--cc=robh+dt@kernel.org \
--cc=shawnguo@kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=treding@nvidia.com \
--cc=will.deacon@arm.com \
--cc=wim@iguana.be \
--cc=yamada.masahiro@socionext.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
all inboxes | Powered by JetHome®