mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Trent Piepho <trent.piepho@synapse.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2 1/4] aiodev: Name channels with device instance name
Date: Tue, 29 Sep 2020 09:04:56 +0200	[thread overview]
Message-ID: <20200929070456.GS11648@pengutronix.de> (raw)
In-Reply-To: <20200925234315.453448-1-trent.piepho@synapse.com>

On Fri, Sep 25, 2020 at 04:43:12PM -0700, Trent Piepho wrote:
> When dynamically assigning device names, an aiodev's name will be
> "aiodev" and an index, not part of the name string itself, will be
> allocated dynamically.  These are combined to register a device with a
> name like "aiodev0" or "aiodev1".
> 
> The shell environment variables use the device name, so one might use
> "${aiodev0.in_value0_mV}" and "${aiodev1.in_value0_mV}".
> 
> However, the channel names that are used with aiochannel_get_by_name()
> just use the aiodev's name and channel name.  So channel 0 of the 1st
> aiodev would be "aiodev.in_value0_mV" and the 2nd aiodev would use the
> same name.
> 
> Change the channel naming to use the device instance name, e.g.
> "aiodev0", rather than the aiodev's base name.  This makes the names
> used aiochannel_get_by_name() match the environment variable names and
> also avoids duplicate names with more than one dynamically allocated
> aiodev.
> 
> Rename aiochannel_get_by_name() to aiochannel_by_name() so that any out
> of tree boards that use it will fail to compile, since they now need to
> pass in a different name.
> 
> Signed-off-by: Trent Piepho <trent.piepho@synapse.com>
> ---
> Changes in v2:
>   * Rename aiochannel_get_by_name()

Applied all, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2020-09-29  7:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-25 23:43 Trent Piepho
2020-09-25 23:43 ` [PATCH v2 2/4] aiodev: am335x_adc: Driver for ADC on TI AM335x SoCs Trent Piepho
2020-09-25 23:43 ` [PATCH v2 3/4] ARM: am335x: Enable TSC/ADC clock Trent Piepho
2020-09-25 23:43 ` [PATCH v2 4/4] ARM: beaglebone: Enable ADC Trent Piepho
2020-09-29  7:04 ` Sascha Hauer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-09-25 23:36 [PATCH v2 1/4] aiodev: Name channels with device instance name Trent Piepho

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=20200929070456.GS11648@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=trent.piepho@synapse.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