public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] i2c: mxs: Add I2C multibus support
Date: Wed, 24 Sep 2014 07:19:08 +0200	[thread overview]
Message-ID: <5422544C.7010308@denx.de> (raw)
In-Reply-To: <CAOMZO5BMUt-YNnQUppiZ1ufFjm4fefrac+uA+B4JQmkyD9cozw@mail.gmail.com>

Hello Fabio,

Am 23.09.2014 17:16, schrieb Fabio Estevam:
> Hi Marek,
>
> On Tue, Sep 23, 2014 at 8:15 AM, Marek Vasut<marex@denx.de>  wrote:
>
>> -void i2c_init(int speed, int slaveadd)
>> +int i2c_set_bus_num(unsigned int bus)
>>   {
>> +       uint32_t mxs_i2c_regs;
>> +
>> +       switch (bus) {
>> +       case 0:
>> +               mxs_i2c_regs = MXS_I2C0_BASE;
>> +               break;
>> +#ifdef CONFIG_MX28
>> +       case 1:
>> +               mxs_i2c_regs = MXS_I2C1_BASE;
>> +               break;
>> +#endif
>> +       default:
>> +               printf("Bad bus: %d\n", bus);
>
> Something like "Invalid I2C bus" would be a clearer error message here.

If Marek convert this driver to the CONFIG_SYS_I2C framework, he can
drop this function complete ...

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

      reply	other threads:[~2014-09-24  5:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-23 11:15 [U-Boot] [PATCH] i2c: mxs: Add I2C multibus support Marek Vasut
2014-09-23 11:48 ` Heiko Schocher
2014-09-23 13:49   ` Otavio Salvador
2014-09-23 14:30     ` Marek Vasut
2014-09-24  5:18       ` Heiko Schocher
2014-09-23 15:16 ` Fabio Estevam
2014-09-24  5:19   ` Heiko Schocher [this message]

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=5422544C.7010308@denx.de \
    --to=hs@denx.de \
    --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