All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Chen-Yu Tsai <wens@csie.org>
Cc: Wolfram Sang <wsa@the-dreams.de>,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	linux-i2c@vger.kernel.org,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	devicetree <devicetree@vger.kernel.org>,
	linux-sunxi <linux-sunxi@googlegroups.com>,
	Hans de Goede <hdegoede@redhat.com>
Subject: Re: [PATCH 2/4] i2c: sunxi: Add Reduced Serial Bus (RSB) DT bindings documentation
Date: Tue, 24 Feb 2015 15:17:51 +0100	[thread overview]
Message-ID: <16025407.hQRFhlbHKD@wuerfel> (raw)
In-Reply-To: <CAGb2v66ru6Yurt1CFn-zocAuqen8GWSm8y9dHRf=-OOcc-DR7g@mail.gmail.com>

On Tuesday 24 February 2015 22:01:26 Chen-Yu Tsai wrote:
> On Tue, Feb 24, 2015 at 6:37 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Tuesday 24 February 2015 18:29:02 Chen-Yu Tsai wrote:
> >>
> >> +       rsb@01f03400 {
> >> +               compatible = "allwinner,sun8i-a23-rsb";
> >> +               reg = <0x01f03400 0x400>;
> >> +               interrupts = <0 39 4>;
> >> +               clocks = <&apb0_gates 3>;
> >> +               clock-frequency = <3000000>;
> >> +               resets = <&apb0_rst 3>;
> >> +
> >> +               axp223: pmic@2d {
> >> +                       compatible = "x-powers,axp223", "x-powers,axp221";
> >> +                       reg = <0x2d>;
> >> +                       allwinner,rsb-hw-addr = <0x3e3>;
> >> +
> >> +                       /* ... */
> >> +               };
> >> +       };
> 
> > I don't really understand the need for having two addresses (runtime
> > and hardware). Could the runtime address be configured at runtime?
> 
> You can, though the driver doesn't support this. I don't think the
> I2C subsystem allows arbitrary device insertion during normal
> operation, but maybe i2c-dev? I've tried using different addresses
> for devices so they do get changed during the probe phase, just
> to be sure that the code works, and it's not just sitting at
> the address the bootloader used.
> 
> In any case, the distinction is more like burnt-in or hardwired
> addresses vs software configurable addresses.

The simplest binding would the probably be to only put the
hardware address into the 'reg' property and always assign the
logical addresses dynamically.

Would that add a lot of complexity or does it have any other
downsides?

	arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
Cc: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
	Maxime Ripard
	<maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	linux-kernel
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	devicetree <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-sunxi <linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>,
	Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH 2/4] i2c: sunxi: Add Reduced Serial Bus (RSB) DT bindings documentation
Date: Tue, 24 Feb 2015 15:17:51 +0100	[thread overview]
Message-ID: <16025407.hQRFhlbHKD@wuerfel> (raw)
In-Reply-To: <CAGb2v66ru6Yurt1CFn-zocAuqen8GWSm8y9dHRf=-OOcc-DR7g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Tuesday 24 February 2015 22:01:26 Chen-Yu Tsai wrote:
> On Tue, Feb 24, 2015 at 6:37 PM, Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org> wrote:
> > On Tuesday 24 February 2015 18:29:02 Chen-Yu Tsai wrote:
> >>
> >> +       rsb@01f03400 {
> >> +               compatible = "allwinner,sun8i-a23-rsb";
> >> +               reg = <0x01f03400 0x400>;
> >> +               interrupts = <0 39 4>;
> >> +               clocks = <&apb0_gates 3>;
> >> +               clock-frequency = <3000000>;
> >> +               resets = <&apb0_rst 3>;
> >> +
> >> +               axp223: pmic@2d {
> >> +                       compatible = "x-powers,axp223", "x-powers,axp221";
> >> +                       reg = <0x2d>;
> >> +                       allwinner,rsb-hw-addr = <0x3e3>;
> >> +
> >> +                       /* ... */
> >> +               };
> >> +       };
> 
> > I don't really understand the need for having two addresses (runtime
> > and hardware). Could the runtime address be configured at runtime?
> 
> You can, though the driver doesn't support this. I don't think the
> I2C subsystem allows arbitrary device insertion during normal
> operation, but maybe i2c-dev? I've tried using different addresses
> for devices so they do get changed during the probe phase, just
> to be sure that the code works, and it's not just sitting at
> the address the bootloader used.
> 
> In any case, the distinction is more like burnt-in or hardwired
> addresses vs software configurable addresses.

The simplest binding would the probably be to only put the
hardware address into the 'reg' property and always assign the
logical addresses dynamically.

Would that add a lot of complexity or does it have any other
downsides?

	arnd

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] i2c: sunxi: Add Reduced Serial Bus (RSB) DT bindings documentation
Date: Tue, 24 Feb 2015 15:17:51 +0100	[thread overview]
Message-ID: <16025407.hQRFhlbHKD@wuerfel> (raw)
In-Reply-To: <CAGb2v66ru6Yurt1CFn-zocAuqen8GWSm8y9dHRf=-OOcc-DR7g@mail.gmail.com>

On Tuesday 24 February 2015 22:01:26 Chen-Yu Tsai wrote:
> On Tue, Feb 24, 2015 at 6:37 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Tuesday 24 February 2015 18:29:02 Chen-Yu Tsai wrote:
> >>
> >> +       rsb at 01f03400 {
> >> +               compatible = "allwinner,sun8i-a23-rsb";
> >> +               reg = <0x01f03400 0x400>;
> >> +               interrupts = <0 39 4>;
> >> +               clocks = <&apb0_gates 3>;
> >> +               clock-frequency = <3000000>;
> >> +               resets = <&apb0_rst 3>;
> >> +
> >> +               axp223: pmic at 2d {
> >> +                       compatible = "x-powers,axp223", "x-powers,axp221";
> >> +                       reg = <0x2d>;
> >> +                       allwinner,rsb-hw-addr = <0x3e3>;
> >> +
> >> +                       /* ... */
> >> +               };
> >> +       };
> 
> > I don't really understand the need for having two addresses (runtime
> > and hardware). Could the runtime address be configured at runtime?
> 
> You can, though the driver doesn't support this. I don't think the
> I2C subsystem allows arbitrary device insertion during normal
> operation, but maybe i2c-dev? I've tried using different addresses
> for devices so they do get changed during the probe phase, just
> to be sure that the code works, and it's not just sitting at
> the address the bootloader used.
> 
> In any case, the distinction is more like burnt-in or hardwired
> addresses vs software configurable addresses.

The simplest binding would the probably be to only put the
hardware address into the 'reg' property and always assign the
logical addresses dynamically.

Would that add a lot of complexity or does it have any other
downsides?

	arnd

  reply	other threads:[~2015-02-24 14:18 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-24 10:29 [PATCH 0/4] i2c: sunxi: Add Reduced Serial Bus (RSB) support Chen-Yu Tsai
2015-02-24 10:29 ` Chen-Yu Tsai
2015-02-24 10:29 ` Chen-Yu Tsai
2015-02-24 10:29 ` [PATCH 1/4] " Chen-Yu Tsai
2015-02-24 10:29   ` Chen-Yu Tsai
2015-02-24 10:29   ` Chen-Yu Tsai
2015-02-24 10:29 ` [PATCH 2/4] i2c: sunxi: Add Reduced Serial Bus (RSB) DT bindings documentation Chen-Yu Tsai
2015-02-24 10:29   ` Chen-Yu Tsai
2015-02-24 10:29   ` Chen-Yu Tsai
2015-02-24 10:37   ` Arnd Bergmann
2015-02-24 10:37     ` Arnd Bergmann
2015-02-24 10:37     ` Arnd Bergmann
2015-02-24 14:01     ` Chen-Yu Tsai
2015-02-24 14:01       ` Chen-Yu Tsai
2015-02-24 14:01       ` Chen-Yu Tsai
2015-02-24 14:17       ` Arnd Bergmann [this message]
2015-02-24 14:17         ` Arnd Bergmann
2015-02-24 14:17         ` Arnd Bergmann
2015-02-24 14:32         ` Chen-Yu Tsai
2015-02-24 14:32           ` Chen-Yu Tsai
2015-02-24 14:32           ` Chen-Yu Tsai
2015-02-25 16:10           ` Arnd Bergmann
2015-02-25 16:10             ` Arnd Bergmann
2015-02-24 10:29 ` [PATCH 3/4] ARM: dts: sun8i: Add Reduced Serial Bus controller device node to A23 dtsi Chen-Yu Tsai
2015-02-24 10:29   ` Chen-Yu Tsai
2015-02-24 10:29   ` Chen-Yu Tsai
2015-02-24 10:29 ` [PATCH 4/4] ARM: dts: sun8i: ippo-q8h-v5: Enable Reduced Serial Bus controller Chen-Yu Tsai
2015-02-24 10:29   ` Chen-Yu Tsai
2015-02-24 10:29   ` Chen-Yu Tsai

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=16025407.hQRFhlbHKD@wuerfel \
    --to=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=hdegoede@redhat.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=wens@csie.org \
    --cc=wsa@the-dreams.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.