From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] ARM: tegra: Add e2220-1170 board
Date: Thu, 30 Jul 2015 14:05:17 -0600 [thread overview]
Message-ID: <55BA837D.6030102@wwwdotorg.org> (raw)
In-Reply-To: <CAPnjgZ1W7AmTWDJKGPkSDc_j6o7qGwEEHQqw5q1CGY1tNwpp9A@mail.gmail.com>
On 07/30/2015 12:23 PM, Simon Glass wrote:
> Hi Stephen,
>
> On 30 July 2015 at 12:13, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> On 07/29/2015 05:02 PM, Simon Glass wrote:
>>>
>>> Hi Stephen,
>>>
>>> On 29 July 2015 at 13:48, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>>> diff --git a/board/nvidia/e2220-1170/e2220-1170.c
>>>> b/board/nvidia/e2220-1170/e2220-1170.c
>>
>>>> +void pin_mux_mmc(void)
>>>> +{
>>>> + struct udevice *dev;
>>>> + uchar val;
>>>> + int ret;
>>>> +
>>>> + /* Turn on MAX77620 LDO2 to 3.3V for SD card power */
>>>> + ret = i2c_get_chip_for_busnum(0, 0x3c, 1, &dev);
>>>> + if (ret) {
>>>> + printf("%s: Cannot find MAX77620 I2C chip\n", __func__);
>>>> + return;
>>>> + }
>>>> + val = 0xf2;
>>>> + ret = dm_i2c_write(dev, 0x27, &val, 1);
>>>> + if (ret)
>>>> + printf("i2c_write 0 0x3c 0x27 failed: %d\n", ret);
>>>
>>>
>>> Shouldn't this be in a PMIC driver?
>>
>>
>> I think the overall amount of code contained in U-Boot ends up being a lot
>> smaller this way; it simply and directly performs some necessary I2C writes,
>> and V2 contains better comments describing the operation. This avoids all
>> the overhead of creating a PMIC driver and instantiating it etc. This code
>> is also consistent in style with many other Tegra boards. I'm rather
>> inclined to leave this as-is unless there's some particular advantage you
>> can state to creating a PMIC driver (I had thought of that original, but
>> shied away from the large overhead/infrastructure involved with that.)
>
> If this is the only write that happens to the PMIC then that is fine.
> But when you add other things, won't we need to adjust more things?
I believe for the set of peripherals we're likely to support in U-Boot,
this is enough. On the off-chance we add HDMI or USB3 host support,
perhaps we'll need more regulators, but that's not something that's
likely to happen soon.
next prev parent reply other threads:[~2015-07-30 20:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-29 19:48 [U-Boot] [PATCH 1/2] ARM: tegra: Add e2220-1170 board Stephen Warren
2015-07-29 19:48 ` [U-Boot] [PATCH 2/2] ARM: tegra: Add p2371-0000 board Stephen Warren
2015-07-29 20:06 ` Tom Warren
2015-07-29 23:02 ` [U-Boot] [PATCH 1/2] ARM: tegra: Add e2220-1170 board Simon Glass
2015-07-30 2:42 ` Tom Warren
2015-07-30 18:03 ` Stephen Warren
2015-07-30 18:11 ` Tom Warren
2015-07-30 18:17 ` Simon Glass
2015-07-30 18:13 ` Stephen Warren
2015-07-30 18:23 ` Simon Glass
2015-07-30 20:05 ` Stephen Warren [this message]
2015-07-31 7:27 ` Thierry Reding
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=55BA837D.6030102@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=u-boot@lists.denx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox