[i2c] [PATCH 8/12] drivers: PMC MSP71xx TWI driver

Marc St-Jean Marc_St-Jean at pmc-sierra.com
Fri Jun 29 21:33:05 CEST 2007



Trilok Soni wrote:
> On 6/29/07, Marc St-Jean <stjeanma at pmc-sierra.com> wrote:
>  > [PATCH 8/12] drivers: PMC MSP71xx TWI driver
>  >
>  >
>  > diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
>  > index ece31d2..303faf9 100644
>  > --- a/drivers/i2c/busses/Kconfig
>  > +++ b/drivers/i2c/busses/Kconfig
>  > @@ -582,4 +582,10 @@ config I2C_PNX
>  >           This driver can also be built as a module.  If so, the module
>  >           will be called i2c-pnx.
>  >
>  > +config I2C_PMCMSP
>  > +       tristate "PMC MSP I2C TWI Controller"
>  > +       depends on PMC_MSP
>  > +       help
>  > +         This driver supports the PMC TWI controller on MSP devices.
> 
> Better if you add one line like "This driver can also be built as
> module, If so, the module
> will be called i2c-pmcmsp." :)
> 
>  > +
>  >  endmenu
> 
> ...
> 
>  > +
>  > +/*
>  > + * Sends an i2c command out on the adapter
>  > + */
>  > +static int pmcmsptwi_master_xfer(struct i2c_adapter *adap,
>  > +                               struct i2c_msg *msg, int num)
>  > +{
>  > +       struct pmcmsptwi_data *data = adap->algo_data;
> 
> i2c_get_adapdata?
> 
...

>  > +
>  > +static int __init pmcmsptwi_init(void)
>  > +{
>  > +       printk(KERN_INFO "PMC MSP TWI Driver\n");
>  > +
>  > +       if (platform_driver_register(&pmcmsptwi_driver)) {
>  > +               printk(KERN_ERR "Driver registration failed\n");
>  > +               return -ENOMEM;
> 
> Return code should be -ENODEV not -ENOMEM.
> 
...

Thanks, all incorporated in to the next patch.
Marc



More information about the i2c mailing list