27;, comparison (error < 0) just doesn't look
> right.
> If it was *if* (error), it would have been more correct.
It's error when it's negative. That's how PM runtime is designed.
> > + pm_runtime_put_noidle(cdd->ddev.dev);
> > +
> > + return NULL;
> > + }
--
With Best Regards,
Andy Shevchenko
Use fwnode_property_count_uXX() directly, that makes code neater.
Signed-off-by: Andy Shevchenko
---
drivers/usb/typec/mux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/typec/mux.c b/drivers/usb/typec/mux.c
index 61b7bc58dd81..57907f26f681 100644
--- a
Use use fwnode_property_count_uXX() directly, that makes code neater.
Signed-off-by: Andy Shevchenko
---
drivers/usb/typec/tcpm/tcpm.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index fba32d84e578
Use use device_property_count_u32() directly, that makes code neater.
Signed-off-by: Andy Shevchenko
---
drivers/usb/dwc3/core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index c9bb93a2c81e..98bce85c29d0 100644
--- a
Use use device_property_count_u32() directly, that makes code neater.
Signed-off-by: Andy Shevchenko
---
drivers/usb/dwc2/params.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
index 55f841a54015..31e090ac9f1e
When we read an array of integers from device properties,
the temporary buffer is allocated.
However, in case of dwc3_set_incr_burst_type() it's not freed.
Free allocated buffer immediately after use.
Signed-off-by: Andy Shevchenko
---
drivers/usb/dwc3/core.c | 3 +++
1 file chang
er
> usb_role_switch.
> +static int __switch_match_node(struct device *dev, const void *node)
> +{
> + return dev->parent->of_node == (const struct device_node *)node;
> +}
Hmm... Shouldn't be slightly better to compare fwnode instead?
--
With Best Regards,
Andy Shevchenko
On Mon, Mar 4, 2019 at 4:35 AM Chen Yu wrote:
> On 2019/3/3 0:01, Andy Shevchenko wrote:
> > On Sat, Mar 2, 2019 at 11:05 AM Yu Chen wrote:
> >> +config HISI_HIKEY_USB
> >> + tristate "USB functionality of HiSilicon Hikey Platform"
> >> +
will
have ->probed() and not functional device.
Am I missing something?
--
With Best Regards,
Andy Shevchenko
On Fri, Mar 1, 2019 at 3:25 AM Jun Li wrote:
>
> This patch adds a simple typec switch driver which only needs
> a GPIO to switch the super speed active channel according to
> typec orientation.
FWIW,
Reviewed-by: Andy Shevchenko
One minor below.
>
> Signed-off-by: Li Jun
(IS_ERR(hisi_hikey_usb->role_sw))
Redundant 'else'
> + return PTR_ERR(hisi_hikey_usb->role_sw);
> +static const struct of_device_id id_table_hisi_hikey_usb[] = {
> + {.compatible = "hisilicon,gpio_hubv1"},
> + {.compatible = "hisilicon,hikey960_usb"},
> + {}
> +};
MODULE_DEVICE_TABLE()?
--
With Best Regards,
Andy Shevchenko
On Sat, Mar 2, 2019 at 11:06 AM Yu Chen wrote:
>
> This driver handles usb phy power on and shutdown for hi3660 Soc of
> Hisilicon.
Few comments below. After fixing them, FWIW
Reviewed-by: Andy Shevchenko
> +#define HI3660_USB_DEFAULT_PHY_PARAM 0x1c466e3
A bit of descr
On Sat, Mar 2, 2019 at 11:06 AM Yu Chen wrote:
>
> It needs more time for the device controller to clear the CmdAct of
> DEPCMD on Hisilicon Kirin Soc.
>
5x times more? Can you provide more specific details on that?
> Cc: Andy Shevchenko
> Cc: Felipe Balbi
> Cc: Greg Kroa
t; +#include
I don't see how these are in use.
--
With Best Regards,
Andy Shevchenko
In case the "linux,extcon-name" property is defined but device itself
is not ready, defer the probe.
Cc: Felipe Balbi
Signed-off-by: Andy Shevchenko
---
This is a missed part of the v2 [1] of the commit 268784ba14a7
("usb: dwc3: drd: Add support for DR detection through
= 1000;
> + u32 timeout = 5000;
I don't see anything about this change in commit message. Moreoever,
it looks like it must be a separate logical change with its own
description.
> u32 saved_config = 0;
> u32 reg;
--
With Best Regards,
Andy Shevchenko
On Fri, Feb 15, 2019 at 4:40 PM Heikki Krogerus
wrote:
>
> On Fri, Feb 15, 2019 at 11:19:47AM +0200, Andy Shevchenko wrote:
> > On Fri, Feb 15, 2019 at 11:01 AM Heikki Krogerus
> > wrote:
> > >
> > > On Fri, Feb 15, 2019 at 01:33:24PM +0800, kbuild tes
76 goto find_mux;
> >177}
> >178}
> >179kfree(val);
> >180return NULL;
> >181
> >182find_mux:
> >183list_for_each_entry(mux, &mux_list, entry)
> >184if (dev_fwnode(mux->dev) == con->fwnode)
> >185return mux;
> >186
> >187return match ? ERR_PTR(-EPROBE_DEFER) : NULL;
> >188}
> >189
>
> thanks,
>
> --
> heikki
--
With Best Regards,
Andy Shevchenko
On Mon, Feb 11, 2019 at 10:39 AM Heikki Krogerus
wrote:
> On Thu, Jan 31, 2019 at 03:35:37PM +0200, Heikki Krogerus wrote:
> > On Wed, Jan 30, 2019 at 06:51:56PM +0200, Andy Shevchenko wrote:
> > > On Wed, Jan 30, 2019 at 6:03 PM Heikki Krogerus
> > > wrote:
> >
On Thu, Jan 31, 2019 at 1:53 PM Pawel Laszczak wrote:
>
> Patch moves switch responsible for decoding descriptor type
> outside snprintf. It's little improves code readability.
> + char *s;
const ?
--
With Best Regards,
Andy Shevchenko
PTR(-EPROBE_DEFER);
Just to be clear, this one takes a reference on dev. Is it taken into account?
--
With Best Regards,
Andy Shevchenko
On Mon, Jan 28, 2019 at 5:46 PM Heikki Krogerus
wrote:
> On Mon, Jan 28, 2019 at 11:53:54AM +0200, Andy Shevchenko wrote:
> > On Fri, Jan 25, 2019 at 3:17 PM Heikki Krogerus
> > wrote:
> > > + bool match = !con->id;
> >
> > I don't see how
on *con, int ep,
> + void *data);
devcon_match_fn ?
_t sounds to me more like a struct or a redefined POD.
--
With Best Regards,
Andy Shevchenko
+ if (dev_fwnode(mux->dev) == con->fwnode)
> return mux;
>
> - /*
> -* We only get called if a connection was found, tell the caller to
> -* wait for the switch to show up.
> -*/
> - return ERR_PTR(-EPROBE_DEFER);
> + return match ? ERR_PTR(-EPROBE_DEFER) : NULL;
> }
--
With Best Regards,
Andy Shevchenko
typec_mux_match);
Not related to this series, but shouldn't
device_connection_find_match() be improved to avoid dropping const
qualifier?
--
With Best Regards,
Andy Shevchenko
On Fri, Jan 25, 2019 at 3:17 PM Heikki Krogerus
wrote:
>
> Driver for fusb302 does not support alternate modes, so the
> connection is not really needed for now. Removing that
> connection description allows us to improve the USB Type-C
> mux API.
>
Acked-by: Andy Shevchenko
(gpio))
> return PTR_ERR(gpio);
>
> if (gpio) {
> gpiod_set_value_cansleep(gpio, 1);
> + gpiod_put(gpio);
> usleep_range(1, 11000);
If something happens to GPIO line in between of these lines, the sleep
might become obsolete. Shouldn't gpiod_put() be placed after?
> }
> }
--
With Best Regards,
Andy Shevchenko
On Wed, Dec 05, 2018 at 10:25:36AM +0100, Greg Kroah-Hartman wrote:
> On Mon, Dec 03, 2018 at 09:23:44PM +0200, Andy Shevchenko wrote:
> > On Thu, Nov 15, 2018 at 04:53:03PM +0200, Heikki Krogerus wrote:
> > > FWIW, the series:
> > > Reviewed-by: Heikki Krogerus
>
On Wed, Dec 05, 2018 at 11:18:45AM +0200, Andy Shevchenko wrote:
> On Wed, Dec 05, 2018 at 11:10:46AM +0200, Felipe Balbi wrote:
> > Andy Shevchenko writes:
> >
> > > The missed break statement in the outer switch makes the code fall through
> > > always a
On Wed, Dec 05, 2018 at 11:10:46AM +0200, Felipe Balbi wrote:
> Andy Shevchenko writes:
>
> > The missed break statement in the outer switch makes the code fall through
> > always and thus always same value will be printed.
> >
> > Besides that, compiler warns ab
On Wed, Dec 5, 2018 at 3:57 AM Chen Yu wrote:
> On 2018/12/5 1:47, Andy Shevchenko wrote:
> > On Tue, Dec 4, 2018 at 3:40 AM Chen Yu wrote:
> >> On 2018/12/3 17:23, Andy Shevchenko wrote:
> >>> On Mon, Dec 3, 2018 at 5:47 AM Yu Chen wrote:
> >
&g
On Tue, Dec 4, 2018 at 3:40 AM Chen Yu wrote:
> On 2018/12/3 17:23, Andy Shevchenko wrote:
> > On Mon, Dec 3, 2018 at 5:47 AM Yu Chen wrote:
> >> + .of_match_table = of_match_ptr(id_table_hisi_hikey_usb),
> >
> > Does it compiles for non-OF case? Why
On Thu, Nov 15, 2018 at 04:53:03PM +0200, Heikki Krogerus wrote:
> On Thu, Nov 15, 2018 at 03:16:19PM +0200, Andy Shevchenko wrote:
> > Since we are going to use the same in Designware USB 3 driver,
> > rename the property to be consistent across the drivers.
> >
> > No
ned-off-by: Andy Shevchenko
---
drivers/usb/dwc3/trace.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/usb/dwc3/trace.h b/drivers/usb/dwc3/trace.h
index f22714cce070..8e1625a6c19f 100644
--- a/drivers/usb/dwc3/trace.h
+++ b/drivers/usb/dwc3/trace.h
@@ -23
len;
> +}
> + struct usb_gadget_driver *gadget_driver =
> + &(to_gadget_info(item)->composite.gadget_driver);
Make it neat.
--
With Best Regards,
Andy Shevchenko
_NULL(hisi_hikey_usb->role_sw)) {
> + pr_err("%s: usb_role_switch_get failed\n", __func__);
Noise and same comment to the conditional check as above
> + if (!hisi_hikey_usb->role_sw)
> + ret = -ENOENT;
> + el
("%s:set role %d\n", __func__, role);
Noise!
> + return role;
> +
Redundant blank line.
> +}
--
With Best Regards,
Andy Shevchenko
ntroduced some more generic function for this.
> sw = device_connection_find_match(dev, "usb-role-switch", NULL,
> usb_role_switch_match);
> + sw = of_graph_find_match_by_type(dev, "usb-role-switch");
Why this is here?!
TG3_CTRL7 (0x1c)
> +#define REF_SSP_EN BIT(16)
> +
> +#define HI3660_USB_DEFAULT_PHY_PARAM (0x1c466e3)
A lot of redundant parens.
> +static const struct of_device_id hi3660_phy_of_match[] = {
> + {.compatible = "hisilicon,hi3660-usb-phy",},
> + { },
No comma needed.
> +};
--
With Best Regards,
Andy Shevchenko
;
Noise
> +}
> +static int dwc3_hisi_resume(struct device *dev)
__maybe_unused ?
> +{
> + dev_info(dev, "%s\n", __func__);
Noise.
> + /* Wait for clock stable */
> + msleep(100);
Don't you have any hardware notification that clocks ar
readl(dwc->regs, DWC3_GCTL);
> + reg &= ~(DWC3_GCTL_CORESOFTRESET);
> + dwc3_writel(dwc->regs, DWC3_GCTL, reg);
> +}
> + int reg;
Ditto.
--
With Best Regards,
Andy Shevchenko
Switch to device property for 'extcon' handling.
No functional change intended.
Signed-off-by: Andy Shevchenko
Acked-by: Hans de Goede
---
drivers/usb/dwc3/drd.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/d
for kernel
internal use by X86/ACPI platform code and as such is not documented
in the device tree bindings.
Signed-off-by: Andy Shevchenko
Acked-by: Hans de Goede
---
drivers/usb/dwc3/drd.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/
Since we are going to use the same in Designware USB 3 driver,
rename the property to be consistent across the drivers.
No functional change intended.
Signed-off-by: Andy Shevchenko
Cc: Hans de Goede
Cc: Guenter Roeck
Acked-by: Hans de Goede
Acked-by: Guenter Roeck
---
drivers/platform/x86
On Wed, Nov 14, 2018 at 1:17 PM Andy Shevchenko
wrote:
> On Wed, Nov 14, 2018 at 1:05 PM Chanwoo Choi wrote:
> > > Changing NULL to -ENODEV is a trading bad to worse.
> P.S. I still disagree with your arguments in relation to de facto use of an
> API.
I spoke to colleague
On Wed, Nov 14, 2018 at 1:05 PM Chanwoo Choi wrote:
> On 2018년 11월 14일 19:20, Andy Shevchenko wrote:
> > On Wed, Nov 14, 2018 at 11:48 AM Chanwoo Choi wrote:
> >> On 2018년 11월 14일 18:36, Andy Shevchenko wrote:
> >>> On Wed, Nov 14, 2018 at 06:13:37PM +0900, Chanw
On Wed, Nov 14, 2018 at 11:48 AM Chanwoo Choi wrote:
>
> On 2018년 11월 14일 18:36, Andy Shevchenko wrote:
> > On Wed, Nov 14, 2018 at 06:13:37PM +0900, Chanwoo Choi wrote:
> >> On 2018년 11월 14일 17:35, Andy Shevchenko wrote:
> >>> On Wed, Nov 14, 2018 at 1
On Wed, Nov 14, 2018 at 06:13:37PM +0900, Chanwoo Choi wrote:
> On 2018년 11월 14일 17:35, Andy Shevchenko wrote:
> > On Wed, Nov 14, 2018 at 1:53 AM Chanwoo Choi wrote:
> >
> >> I was thinking about again to change from NULL to EPROBE_DEFER.
> >>
> >> e
ork?
>
> I'm struggling to follow the original explanation too :(
Sorry, guys, I confused a nit myself. The bug is there, but
exxplanation is not fully corrent, indeed. I'll come back with more
details later.
--
With Best Regards,
Andy Shevchenko
09:24, Chanwoo Choi wrote:
> > On 2018년 11월 11일 03:10, Andy Shevchenko wrote:
> >> All current users of extcon_get_extcon_dev() API considers
> >> an extcon device a mandatory to appear. Thus, they all convert
> >> NULL pointer to -EPROBE_DEFER error code.
> &
On Sat, Nov 10, 2018 at 10:26:22AM -0800, Greg Kroah-Hartman wrote:
> On Sat, Nov 10, 2018 at 08:10:57PM +0200, Andy Shevchenko wrote:
> > Consider the following scenario.
> >
> > There are two independent devices coupled together by functional
> > dependencie
for kernel
internal use by X86/ACPI platform code and as such is not documented
in the device tree bindings.
Signed-off-by: Andy Shevchenko
---
drivers/usb/dwc3/drd.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/drd.c
index 5dc4cddd5b68..d6
Since we are going to use the same in Designware USB 3 driver,
rename the property to be consistent across the drivers.
No functional change intended.
Cc: Hans de Goede
Cc: Guenter Roeck
Signed-off-by: Andy Shevchenko
---
drivers/platform/x86/intel_cht_int33fe.c | 2 +-
drivers/usb/typec
Switch to device property for 'extcon' handling.
No functional change intended.
Signed-off-by: Andy Shevchenko
---
drivers/usb/dwc3/drd.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/drd.c
index e7e421521a34..5d
lipe Balbi
Cc: Andrzej Hajda
Signed-off-by: Andy Shevchenko
---
drivers/base/dd.c | 27 ++-
1 file changed, 2 insertions(+), 25 deletions(-)
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 169412ee4ae8..9a966e45fda5 100644
--- a/drivers/base/dd.c
+++ b/drivers
-EPROBE_DEFER directly from extcon_get_extcon_dev().
Signed-off-by: Andy Shevchenko
---
drivers/extcon/extcon-axp288.c| 4 ++--
drivers/extcon/extcon.c | 2 +-
drivers/power/supply/axp288_charger.c | 8
drivers/usb/phy/phy-omap-otg.c| 6 +++---
drivers/usb
On Fri, Nov 09, 2018 at 05:45:16PM +0100, Wolfram Sang wrote:
> On Mon, Oct 29, 2018 at 02:42:37PM +0200, Andy Shevchenko wrote:
> > On Fri, Oct 26, 2018 at 09:36:57AM -0700, Ajay Gupta wrote:
> > > Hi Heikki and Wolfram,
> > >
> > > These two changes add
limitation is not affecting I2C host which do not have such
> limitation.
>
> I think the patches should through usb tree because the main functionality is
> usb Type-C.
FWIW,
Reviewed-by: Andy Shevchenko
>
> Thanks
> Ajay
>
> Ajay Gupta (2):
> i2c: buses: ad
usleep_range(1, 11000);
> + } while (data && --count);
I don't see any point to check data here. How can it be different from the
check above?
> + return -ETIMEDOUT;
--
With Best Regards,
Andy Shevchenko
to clear interrupt status.
> > >
> > > > Shouldn't you return -ETIMEDOUT if count == 0?
> > > Yes. Good catch. Does the below fix looks ok?
> >
> > At least for me looks OK (I dunno why I missed that what Heikki found
> > recently).
> > Nevertheless, I have one more question about (1) and (2) above.
> >
> > Is it necessary to do one more read before do-while loop?
> Yes, we need to read to get interrupt status bits and then write
> them back to clear the status.
Ah, I see, but why you not reorganize it to put this into do-while loop?
do {
read
write
check for data
sleep
} while (--count);
Also note predecrement.
--
With Best Regards,
Andy Shevchenko
do {
> status = ccg_write(uc, CCGX_RAB_INTR_REG, &data,
> sizeof(data));
> if (status < 0)
> return status;
>
> usleep_range(1, 11000);
>
> status = ccg_read(uc, CCGX_RAB_INTR_REG, &data, sizeof(data));
> if (status < 0)
> return status;
>
> if (!data)
> return 0;
> } while (data && count--);
>
> return -ETIMEDOUT;
--
With Best Regards,
Andy Shevchenko
On Thu, Sep 6, 2018 at 1:22 AM Ajay Gupta wrote:
>
> Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller
> over I2C interface.
>
> This UCSI I2C driver uses I2C bus driver interface for communicating
> with Type-C controller.
>
FWIW,
Reviewed-by: Andy Shevchenko
of USB Type-C UCSI driver.
>
FWIW,
Reviewed-by: Andy Shevchenko
> Signed-off-by: Ajay Gupta
> ---
> Changes from v1 -> v2
> None
> Changes from v2 -> v3
> Fixed review comments from Andy and Thierry
> Rename i2c-gpu.c -> i2c-nvidia-gpu.c
>
ices.
>
> The origin thread can be read here:
> https://www.spinics.net/lists/linux-usb/msg172033.html
>
>
It seems you forgot my tag
Acked-by: Andy Shevchenko
for PDx86 bits on condition that Hans is okay with them.
> Heikki Krogerus (10):
> usb: typec: Take care o
rs. I also
> added a trivial cleanup patch (patch 10/10) for the fusb302.c to this
> series, and also a few fixes (1/10 and 2/10) to the mux handling.
>
> The origin thread can be read here:
> https://www.spinics.net/lists/linux-usb/msg172033.html
>
>
Acked-by: Andy Shevchenk
On Mon, Sep 3, 2018 at 10:19 AM Heikki Krogerus
wrote:
>
> On Mon, Sep 03, 2018 at 09:17:13AM +0300, Andy Shevchenko wrote:
> > On Fri, Aug 31, 2018 at 5:21 PM Heikki Krogerus
> > wrote:
> > >
> > > Hi,
> > >
> > > The second last patch in th
int33fe.c | 34 +++--
> drivers/usb/host/xhci-pci.c | 20 +++--
> drivers/usb/typec/class.c| 38 ++--
> include/linux/device.h | 24 +++
> 4 files changed, 74 insertions(+), 42 deletions(-)
>
> --
> 2.18.0
>
--
With Best Regards,
Andy Shevchenko
it make sense to have
this in some header (usb.h?)?
--
With Best Regards,
Andy Shevchenko
gt;data->ctrl.raw_cmd = ctrl->raw_cmd;
> + err = ucsi_ccg_send_data(uc);
> +
> + return err;
> +}
> +static int ucsi_ccg_probe(struct i2c_client *client,
> + const struct i2c_device_id *id)
One line?
> +static const struct i2c_device_id ucsi_ccg_device_id[] = {
> + {"ccgx-ucsi", 0},
> + {},
Terminator better w/o comma.
> +};
> +MODULE_DEVICE_TABLE(i2c, ucsi_ccg_device_id);
--
With Best Regards,
Andy Shevchenko
he class appears it can be added later on.
> + { }
> +};
> +MODULE_DEVICE_TABLE(pci, gpu_i2c_ids);
> +
> +static int gpu_i2c_probe(struct pci_dev *dev, const struct pci_device_id *id)
Use pdev instead of dev to distinguish struct device from struct
pci_dev type in variable name.
> +static void gpu_i2c_remove(struct pci_dev *dev)
Ditto.
> + struct gpu_i2c_dev *i2cd = pci_get_drvdata(to_pci_dev(dev));
Isn't the same as dev_get_drvdata() ?
> + struct gpu_i2c_dev *i2cd = pci_get_drvdata(to_pci_dev(dev));
Ditto.
--
With Best Regards,
Andy Shevchenko
Switch to bitmap_zalloc() to show clearly what we are allocating.
Besides that it returns pointer of bitmap type instead of opaque void *.
Signed-off-by: Andy Shevchenko
---
drivers/usb/wusbcore/wa-rpipe.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb
+ if (status < 0) {
> + dev_err(uc->dev, "ucsi_ccg_init failed - %d\n", status);
> + return status;
> + }
> +
> + uc->irq = client->irq;
> +
> + status = devm_request_threaded_irq(dev, uc->irq, NULL,
> ccg_irq_handler,
> + IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
ONESHORT can be dropped here (it's set based on condition when irq
handler NULL and threadirq is not).
> + dev_name(dev), uc);
> + if (status < 0) {
> + dev_err(uc->dev, "request_threaded_irq failed - %d\n",
> status);
> + return status;
> + }
> +
> + uc->ucsi = ucsi_register_ppm(dev, &uc->ppm);
> + if (IS_ERR(uc->ucsi)) {
> + dev_err(uc->dev, "ucsi_register_ppm failed\n");
> + return PTR_ERR(uc->ucsi);
> + }
> +
> + i2c_set_clientdata(client, uc);
> + return 0;
> +}
> +
> +static int ucsi_ccg_remove(struct i2c_client *client)
> +{
> + struct ucsi_ccg *uc = i2c_get_clientdata(client);
> +
> + ucsi_unregister_ppm(uc->ucsi);
> +
> + return 0;
> +}
> +
> +static const struct i2c_device_id ucsi_ccg_device_id[] = {
> + {"ccgx-ucsi", 0},
> + {},
Terminator line better without comma.
> +};
> +MODULE_DEVICE_TABLE(i2c, ucsi_ccg_device_id);
> +
> +static struct i2c_driver ucsi_ccg_driver = {
> + .driver = {
> + .name = "ucsi_ccg",
> + },
> + .probe = ucsi_ccg_probe,
> + .remove = ucsi_ccg_remove,
> + .id_table = ucsi_ccg_device_id,
> +};
> +
> +module_i2c_driver(ucsi_ccg_driver);
> +
> +MODULE_AUTHOR("Ajay Gupta ");
> +MODULE_DESCRIPTION("UCSI driver for Cypress CCGx Type-C controller");
> +MODULE_LICENSE("GPL v2");
> --
> 2.7.4
>
--
With Best Regards,
Andy Shevchenko
will be part of USB Type-C UCSI driver.
>
Some small comments below, after addressing them
Reviewed-by: Andy Shevchenko
> Signed-off-by: Ajay Gupta
> ---
> Changes from v1 -> v2
> None
> Changes from v2 -> v3
> Fixed review comments from Andy and Thi
If dwc3_core_init_mode() fails with deferred probe,
next probe fails on sysfs with
sysfs: cannot create duplicate filename
'/devices/pci:00/:00:11.0/dwc3.0.auto/dwc3.0.auto.ulpi'
To avoid this failure, clean up ULPI device.
Signed-off-by: Andy Shevchenko
---
drivers/usb/d
ange here.
Anyway, it's a minor. Free to fix whenever more serious stuff appears.
--
With Best Regards,
Andy Shevchenko
d. If you are not the intended recipient, please contact the
> sender by
> reply email and destroy all copies of the original message.
> ---
You have an issue here.
--
With Best Regards,
Andy Shevchenko
pinctrl_select_state(ci->platdata->pctl,
> +ci->platdata->pins_device);
> + if (ci->platdata->pins_device && ci->platdata->pins_default)
> + pinctrl_select_state(ci->platdata->pctl,
> +ci->platdata->pins_default);
Ditto about conditional.
--
With Best Regards,
Andy Shevchenko
On Mon, Aug 20, 2018 at 3:21 PM Laurent Pinchart
wrote:
>
> Hi Andy,
>
> On Monday, 20 August 2018 15:06:31 EEST Andy Shevchenko wrote:
> > On Mon, Aug 20, 2018 at 2:25 PM, Laurent Pinchart wrote:
> > >> - TP_printk("%s: cmd '%s
Side note: # is one character less for the same.
--
With Best Regards,
Andy Shevchenko
uest->wIndex;
> + epnum = (u8) le16_to_cpu(ctrlrequest->wIndex);
> + u16 reqval = le16_to_cpu(ctrlrequest->wValue);
> + u16 reqidx = le16_to_cpu(ctrlrequest->wIndex);
I'm wondering, if you run make with C=1 CF=-D__CHECK_ENDIAN__ before
and after your
}
devm_ ?
> + return 0;
> +}
> +
> +static void ftdi_unregister_cbus_gpiochip(struct usb_serial_port *port)
> +{
> + struct ftdi_private *priv = usb_get_serial_port_data(port);
> + struct ftdi_gpiochip *fgc = priv->fgc;
> +
> + if (fgc) {
How you can b
gt;> either.
>> The check is redundant and absence of else adds additional burden on
>> the all the rest cases.
>
> Look a little closer
>
>> mode = dwc->dr_mode;
>> hw_mode = DWC3_GHWPARAMS0_MODE(dwc->hwparams.hwparams0);
>>
>> switch (hw_mode) {
> ^^^
> Switching on hw_mode, not mode.
Ah, indeed. That's what I have missed.
Thanks for detailed explanation!
--
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Jul 27, 2018 at 2:02 AM, Thinh Nguyen wrote:
> On 7/26/2018 2:59 PM, Thinh Nguyen wrote:
>> On 7/26/2018 2:32 PM, Andy Shevchenko wrote:
>>> On Thu, Jul 26, 2018 at 11:52 PM, Thinh Nguyen
>>> wrote:
>>>> dwc_usb31 does not support OTG mode. If t
else if (dwc3_is_usb31(...))
?
> + mode = USB_DR_MODE_PERIPHERAL;
> }
>
> if (mode != dwc->dr_mode) {
> --
> 2.11.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majord...@v
define swap32(x) (\
> + {typeof(x) x_ = (x); \
> + (((u32)(x_) << 24) & (u32)0xFF00) | \
> + (((u32)(x_) << 8) & (u32)0x00FF) | \
> + (((u32)(x_) >> 8) & (u32)0xFF00) | \
> + (((u32)(x_) >> 24) & (u32)0x00
On Thu, Jul 26, 2018 at 5:00 PM, Gevorg Sahakyan
wrote:
> dwc2_readl_rep/dwc2_writel_rep functions using readl/writel in a
> loop.
Why this is better? Any regression or what?
--
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-
On Thu, 2018-07-26 at 14:50 +0300, Felipe Balbi wrote:
> Andy Shevchenko writes:
>
> > For now all PCI enumerated dwc3 devices require some properties
> > to be present. This allows us to unconditionally append them and
> > supply
> > via driver_data.
> >
On Intel Edison board the OTG function is enabled, thus,
USB can switch to the host mode.
Allow that by changing dr_mode property to "otg" for Intel Merrifield.
Signed-off-by: Andy Shevchenko
---
drivers/usb/dwc3/dwc3-pci.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletio
For now all PCI enumerated dwc3 devices require some properties
to be present. This allows us to unconditionally append them and supply
via driver_data.
No functional change intended.
Signed-off-by: Andy Shevchenko
---
drivers/usb/dwc3/dwc3-pci.c | 107 +---
1
uld change it, I will fix it
> in v2
But you didn't put that comment before each occurrence of this
constant in the code, right?
That's what I'm talking about. If reader looks into the code, there is
no need to understand the order of the value for timeout, since units
are part o
#define STREAM_TIMEOUT 50
Perhaps, STREAM_TIMEOUT_MS 50
Dunno about this driver, but it's a usual practice to help reader with
understanding code on the first glance.
--
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe li
On Intel Edison board the OTG function is enabled, thus,
USB can switch to the host mode.
Allow that by changing dr_mode property to "otg" for Intel Merrifield.
Signed-off-by: Andy Shevchenko
---
drivers/usb/dwc3/dwc3-pci.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletio
Describe 'wakeup_work' field of struct dwc3_pci to avoid a warning:
drivers/usb/dwc3/dwc3-pci.c:59: warning: Function parameter or member
'wakeup_work' not described in 'dwc3_pci'
Signed-off-by: Andy Shevchenko
---
drivers/usb/dwc3/dwc3-pci.c | 1 +
1 file chang
For now all PCI enumerated dwc3 devices require some properties
to be present. This allows us to unconditionally append them and supply
via driver_data.
No functional change intended.
Signed-off-by: Andy Shevchenko
---
drivers/usb/dwc3/dwc3-pci.c | 145 +++-
1
For now all PCI enumerated dwc3 devices require some properties
to be present. This allows us to unconditionally append them and supply
via driver_data.
No functional change intended.
Signed-off-by: Andy Shevchenko
---
drivers/usb/dwc3/dwc3-pci.c | 145 +++-
1
Describe 'wakeup_work' field of struct dwc3_pci to avoid a warning:
drivers/usb/dwc3/dwc3-pci.c:59: warning: Function parameter or member
'wakeup_work' not described in 'dwc3_pci'
Signed-off-by: Andy Shevchenko
---
drivers/usb/dwc3/dwc3-pci.c | 1 +
1 file chang
On Wed, Jul 18, 2018 at 3:37 PM, Johan Hovold wrote:
> On Wed, Jul 18, 2018 at 03:34:34PM +0300, Andy Shevchenko wrote:
>> On Wed, Jul 18, 2018 at 3:25 PM, Johan Hovold wrote:
>> Looks like ping-pong type of changes.
>> I think the factoring of this particular piece o
00 / (2 * prescaler * clk_div);
> - }
Looks like ping-pong type of changes.
I think the factoring of this particular piece of code can be done in
patch 3 in somewhat similar way.
--
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe
On Tue, Jun 26, 2018 at 3:57 PM, Andy Shevchenko
wrote:
Just noticed you have sent v6.
I'm pretty fine with it, thanks!
--
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.
On Tue, Jun 26, 2018 at 2:51 PM, Loic Poulain wrote:
> On 26 June 2018 at 13:02, Andy Shevchenko wrote:
>> On Mon, Jun 25, 2018 at 3:35 PM, Loic Poulain
>> wrote:
>>> + unsigned char *buf = val;
>>
>> Btw, not sure why you need this now...
>
&g
1 - 100 of 289 matches
Mail list logo