From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 04/23] i2c: Add TPS6586X driver
Date: Mon, 09 Apr 2012 15:57:51 -0600 [thread overview]
Message-ID: <4F835B5F.50006@wwwdotorg.org> (raw)
In-Reply-To: <CAPnjgZ2J9=0BtMf7CdOurH6r-KYL09GueKwLuxt-D-mBj9cE_Q@mail.gmail.com>
On 04/09/2012 03:25 PM, Simon Glass wrote:
> Hi Stephen,
>
> On Mon, Apr 9, 2012 at 2:01 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> On 04/02/2012 05:18 PM, Simon Glass wrote:
>>> This power management chip supports battery charging and a large number
>>> of power supplies. This initial driver only provides the ability to adjust
>>> the two synchronous buck converters SM0 and SM1 in a stepwise manner.
>>>
>>> Signed-off-by: Simon Glass <sjg@chromium.org>
>>
>>> +#define MAX_I2C_RETRY 3
>>> +int tps6586x_read(int reg)
>> ...
>>> + for (i = 0; i < MAX_I2C_RETRY; ++i) {
>>> + if (!i2c_read(I2C_ADDRESS, reg, 1, &data, 1)) {
>>> + retval = (int)data;
>>> + goto exit;
>>> + }
>>> +
>>> + /* i2c access failed, retry */
>>> + udelay(100);
>>> + }
>>
>> Why do we need this retry logic; the kernel driver doesn't appear to
>> have this.
>
> We apparently have found the device to be flaky on i2c sometimes,
> which is why this is here.
Is it the device itself, or bad board layout/...? Do we need something
similar in the kernel?
In general though, if we're having problems communicating with the PMIC,
we're pretty screwed; how do we know whether failed transactions simply
fail (e.g. no ACK), or send bogus data to the PMIC (e.g. set some random
register so that something gets programmed to be over-voltage)? A better
solution might be a full system reset when you fail to communicate with
the PMIC.
next prev parent reply other threads:[~2012-04-09 21:57 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-02 23:18 [U-Boot] [PATCH v3 0/23] tegra: warmboot (suspend / resume) support Simon Glass
2012-04-02 23:18 ` [U-Boot] [PATCH v3 01/23] fdt: Add function to locate an array in the device tree Simon Glass
2012-04-02 23:18 ` [U-Boot] [PATCH v3 02/23] fdt: Add function to return next compatible subnode Simon Glass
2012-04-02 23:18 ` [U-Boot] [PATCH v3 03/23] Add abs() macro to return absolute value Simon Glass
2012-04-02 23:18 ` [U-Boot] [PATCH v3 04/23] i2c: Add TPS6586X driver Simon Glass
2012-04-09 21:01 ` Stephen Warren
2012-04-09 21:25 ` Simon Glass
2012-04-09 21:57 ` Stephen Warren [this message]
2012-04-09 23:02 ` Simon Glass
2012-04-02 23:18 ` [U-Boot] [PATCH v3 05/23] Add AES crypto library Simon Glass
2012-04-03 18:46 ` Yen Lin
2012-04-05 21:38 ` Simon Glass
2012-04-02 23:18 ` [U-Boot] [PATCH v3 06/23] tegra: Move ap20.h header into arch location Simon Glass
2012-04-09 21:03 ` Stephen Warren
2012-04-09 21:06 ` Stephen Warren
2012-04-09 21:24 ` Simon Glass
2012-04-09 21:50 ` Tom Warren
2012-04-09 21:52 ` Simon Glass
2012-04-09 21:55 ` Stephen Warren
2012-04-02 23:18 ` [U-Boot] [PATCH v3 07/23] tegra: Add functions to access low-level Osc/PLL details Simon Glass
2012-04-02 23:18 ` [U-Boot] [PATCH v3 08/23] tegra: Add crypto library for warmboot code Simon Glass
2012-04-03 18:47 ` Yen Lin
2012-04-02 23:18 ` [U-Boot] [PATCH v3 09/23] tegra: Add flow, gp_padctl, fuse, sdram headers Simon Glass
2012-04-03 18:52 ` Yen Lin
2012-04-02 23:18 ` [U-Boot] [PATCH v3 10/23] tegra: Add tegra_get_chip_type() to detect SKU Simon Glass
2012-04-09 21:09 ` Stephen Warren
2012-04-09 21:50 ` Simon Glass
2012-04-02 23:18 ` [U-Boot] [PATCH v3 11/23] tegra: Add header file for APB_MISC register Simon Glass
2012-04-02 23:18 ` [U-Boot] [PATCH v3 12/23] tegra: Add EMC support for optimal memory timings Simon Glass
2012-04-09 23:52 ` jimmzhang
2012-10-06 16:54 ` Albert ARIBAUD
2012-04-02 23:18 ` [U-Boot] [PATCH v3 13/23] tegra: Add PMU to manage power supplies Simon Glass
2012-04-09 23:47 ` jimmzhang
2012-04-02 23:18 ` [U-Boot] [PATCH v3 14/23] tegra: Set up PMU for Nvidia boards Simon Glass
2012-04-02 23:18 ` [U-Boot] [PATCH v3 15/23] tegra: Add warmboot implementation Simon Glass
2012-04-03 18:56 ` Yen Lin
2012-04-09 21:36 ` Stephen Warren
2012-04-10 15:13 ` Simon Glass
2012-04-02 23:18 ` [U-Boot] [PATCH v3 16/23] tegra: Setup PMC scratch info from ap20 setup Simon Glass
2012-04-03 18:57 ` Yen Lin
2012-04-02 23:18 ` [U-Boot] [PATCH v3 17/23] tegra: Set up warmboot code on Nvidia boards Simon Glass
2012-04-02 23:18 ` [U-Boot] [PATCH v3 18/23] tegra: Turn off power detect in board init Simon Glass
2012-04-10 6:02 ` Wei Ni
2012-04-02 23:18 ` [U-Boot] [PATCH v3 19/23] tegra: Add EMC settings for Seaboard Simon Glass
2012-04-02 23:19 ` [U-Boot] [PATCH v3 20/23] fdt: tegra: Add EMC node to device tree Simon Glass
2012-04-02 23:19 ` [U-Boot] [PATCH v3 21/23] tegra: i2c: Add function to find DVC bus Simon Glass
2012-04-02 23:19 ` [U-Boot] [PATCH v3 22/23] tegra: fdt: Add EMC data for Tegra2 Seaboard Simon Glass
2012-04-03 5:22 ` Olof Johansson
2012-04-04 0:47 ` Simon Glass
2012-04-05 21:58 ` Simon Glass
2012-04-02 23:19 ` [U-Boot] [PATCH v3 23/23] tegra: Enable LP0 on Seaboard Simon Glass
2012-04-09 21:54 ` [U-Boot] [PATCH v3 0/23] tegra: warmboot (suspend / resume) support Stephen Warren
2012-04-09 22:05 ` Tom Warren
2012-04-09 22:10 ` Stephen Warren
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=4F835B5F.50006@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