From: Sebastien Bourdelin <sebastien.bourdelin-4ysUXcep3aM1wj+D4I0NRVaTQe2KTcn/@public.gmane.org>
To: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
kernel <kernel-4ysUXcep3aM1wj+D4I0NRVaTQe2KTcn/@public.gmane.org>,
Mark Featherston <mark-L1vi/lXTdtvnC/t2CciAbw@public.gmane.org>,
kris-L1vi/lXTdtvnC/t2CciAbw@public.gmane.org,
Simon Horman
<horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>,
Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
Florian Fainelli
<f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Fabio Estevam <fabio.estevam-3arQi8VN3Tc@public.gmane.org>,
Sascha Hauer <kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
Shawn Guo <shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Russell King <linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>,
Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>,
Wim Van Sebroeck <wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Rob
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-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
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
[not found] ` <20161214231237.17496-2-sebastien.bourdelin-4ysUXcep3aM1wj+D4I0NRVaTQe2KTcn/@public.gmane.org>
2016-12-19 22:05 ` Rob Herring
2016-12-14 23:12 ` [PATCH 3/6] dt-bindings: bus: Add documentation for the Technologic Systems NBUS Sebastien Bourdelin
[not found] ` <20161214231237.17496-4-sebastien.bourdelin-4ysUXcep3aM1wj+D4I0NRVaTQe2KTcn/@public.gmane.org>
2016-12-19 22:12 ` Rob Herring
2016-12-14 23:12 ` [PATCH 4/6] bus: add driver " Sebastien Bourdelin
[not found] ` <20161214231237.17496-5-sebastien.bourdelin-4ysUXcep3aM1wj+D4I0NRVaTQe2KTcn/@public.gmane.org>
2016-12-30 7:58 ` Linus Walleij
[not found] ` <CACRpkdYHHrYY-fAPnNmV94ejFJ36rhSF0SqSVHkTNq+YCRNNZw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-01 19:56 ` Sebastien Bourdelin
[not found] ` <7bc0871f-ac0a-e8a0-0c84-a0e61b3991a8-4ysUXcep3aM1wj+D4I0NRVaTQe2KTcn/@public.gmane.org>
2017-02-03 13:51 ` Linus Walleij
[not found] ` <CACRpkdbAYyxTOq_ZAwjSJAhCbrzTaUMSG9N7t8Wq1ifTDFBLrQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
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
[not found] ` <20161214231237.17496-6-sebastien.bourdelin-4ysUXcep3aM1wj+D4I0NRVaTQe2KTcn/@public.gmane.org>
2016-12-30 8:01 ` Linus Walleij
[not found] ` <20161214231237.17496-1-sebastien.bourdelin-4ysUXcep3aM1wj+D4I0NRVaTQe2KTcn/@public.gmane.org>
2016-12-14 23:12 ` [PATCH 2/6] ARM: dts: TS-4600: add basic device tree Sebastien Bourdelin
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
[not found] ` <20161214231237.17496-7-sebastien.bourdelin-4ysUXcep3aM1wj+D4I0NRVaTQe2KTcn/@public.gmane.org>
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-4ysuxcep3am1wj+d4i0nrvatqe2ktcn/@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=fabio.estevam-3arQi8VN3Tc@public.gmane.org \
--cc=horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org \
--cc=jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=kernel-4ysUXcep3aM1wj+D4I0NRVaTQe2KTcn/@public.gmane.org \
--cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=kris-L1vi/lXTdtvnC/t2CciAbw@public.gmane.org \
--cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
--cc=linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark-L1vi/lXTdtvnC/t2CciAbw@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org \
/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