From: "Mike Frysinger" <vapier.adi@gmail.com>
To: "Bryan Wu" <bryan.wu@analog.com>
Cc: khali@linux-fr.org, i2c@lm-sensors.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] Blackfin I2C/TWI driver: add missing pin mux operation
Date: Thu, 1 Nov 2007 13:51:55 -0400 [thread overview]
Message-ID: <8bd0f97a0711011051o6d52f635i76c3a63b478ac817@mail.gmail.com> (raw)
In-Reply-To: <1193736797-9005-3-git-send-email-bryan.wu@analog.com>
On 10/30/07, Bryan Wu <bryan.wu@analog.com> wrote:
> --- a/drivers/i2c/busses/i2c-bfin-twi.c
> +++ b/drivers/i2c/busses/i2c-bfin-twi.c
> +static int setup_pin_mux(int action, struct bfin_twi_iface *iface)
> +{
> +
> + u16 pin_req[2][3] = {
> + {P_TWI0_SCL, P_TWI0_SDA, 0},
> + {P_TWI1_SCL, P_TWI1_SDA, 0},
> + };
might be better to have this in the boards file ... consider the
scenario on the BF54x where the user wants to use I2C0 and not I2C1 or
vice versa so that they can use the set of pins for something else ...
this would prevent such a setup
> + if (action) {
> + if (peripheral_request_list(pin_req[iface->bus_num], DRV_NAME))
> + return -EFAULT;
> + } else {
> + peripheral_free_list(pin_req[iface->bus_num]);
> + }
> +
> + return 0;
> +}
EFAULT is incorrect i think ... want to pass back the actual value
from peripheral_request_list()
> --- a/drivers/i2c/busses/i2c-bfin-twi.c
> +++ b/drivers/i2c/busses/i2c-bfin-twi.c
> +static int setup_pin_mux(int action, struct bfin_twi_iface *iface)
> +{
> +
> + u16 pin_req[2][3] = {
> + {P_TWI0_SCL, P_TWI0_SDA, 0},
> + {P_TWI1_SCL, P_TWI1_SDA, 0},
> + };
might be better to have this in the boards file ... consider the
scenario on the BF54x where the user wants to use I2C0 and not I2C1 or
vice versa so that they can use the set of pins for something else ...
this would prevent such a setup
if (action)
return peripheral_request_list(pin_req[iface->bus_num],
DRV_NAME);
else
peripheral_free_list(pin_req[iface->bus_num]);
return 0;
-mike
next prev parent reply other threads:[~2007-11-01 17:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-30 9:33 [PATCH 0/2] Blackfin I2C/TWI driver updates Bryan Wu
2007-10-30 9:33 ` [PATCH 1/2] Blackfin I2C/TWI driver: Add platform_resource interface to support multi-port TWI controllers Bryan Wu
2007-11-01 9:44 ` Jean Delvare
2007-10-30 9:33 ` [PATCH 2/2] Blackfin I2C/TWI driver: add missing pin mux operation Bryan Wu
2007-11-01 9:51 ` Jean Delvare
2007-11-01 17:51 ` Mike Frysinger [this message]
2007-11-02 1:48 ` Bryan Wu
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=8bd0f97a0711011051o6d52f635i76c3a63b478ac817@mail.gmail.com \
--to=vapier.adi@gmail.com \
--cc=bryan.wu@analog.com \
--cc=i2c@lm-sensors.org \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®