[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN1PR06MB069DE9058CA3EE9B5635E1DCC660@BN1PR06MB069.namprd06.prod.outlook.com>
Date: Sat, 6 Dec 2014 10:54:26 +0000
From: Muthu Mani <muth@...ress.com>
To: Lee Jones <lee.jones@...aro.org>
CC: Samuel Ortiz <sameo@...ux.intel.com>,
Wolfram Sang <wsa@...-dreams.de>,
Linus Walleij <linus.walleij@...aro.org>,
Alexandre Courbot <gnurou@...il.com>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
Johan Hovold <johan@...nel.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
Rajaram Regupathy <rera@...ress.com>
Subject: RE: [PATCH v4 1/3] mfd: add support for Cypress CYUSBS234 USB Serial
Bridge controller
Thanks for your inputs.
> > +/* Serial interfaces (I2C, SPI, UART) differ in interface subclass */
> > +enum cy_scb_modes {
> > + CY_USBS_SCB_DISABLED = 0,
> > + CY_USBS_SCB_UART = 1,
> > + CY_USBS_SCB_SPI = 2,
> > + CY_USBS_SCB_I2C = 3
>
> Why have you numbered these individually?
I have changed them as #define's now. These values are not arbitrary.
> > + /* Serial interfaces (I2C, SPI, UART) differ in interface subclass */
> > + switch (interface->cur_altsetting->desc.bInterfaceSubClass) {
> > + case CY_USBS_SCB_I2C:
> > + dev_info(&interface->dev, "using I2C interface\n");
> > + cyusbs23x_devs = cyusbs23x_i2c_gpio_devs;
> > + ndevs = ARRAY_SIZE(cyusbs23x_i2c_gpio_devs);
>
> Not sure I get this. Why do you have local variables for these instead of using
> them directly?
We are planning to support other protocols in future. To facilitate that, local variables are used.
> > + return 0;
> > +
> > +error:
> > + usb_put_dev(cyusbs->usb_dev);
>
> Isn't there a devm_* version of usb_set_intfdata()?
No.
Thanks,
Muthu
This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message.
Powered by blists - more mailing lists