[PATCH v2] usb: Add device quirk for Logitech HD Pro Webcam C920-C

2017-08-25 Thread Dmitry Fleytman
Changes since v1:

 - C920-C added to the comments section

Dmitry Fleytman (1):
  usb: Add device quirk for Logitech HD Pro Webcam C920-C

 drivers/usb/core/quirks.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.7.4

--
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


[PATCH v2] usb: Add device quirk for Logitech HD Pro Webcam C920-C

2017-08-25 Thread Dmitry Fleytman
Commit e0429362ab15
("usb: Add device quirk for Logitech HD Pro Webcams C920 and C930e")
introduced quirk to workaround an issue with some Logitech webcams.

Apparently model C920-C has the same issue so applying
the same quirk as well.

See aforementioned commit message for detailed explanation of the problem.

Signed-off-by: Dmitry Fleytman 
---
 drivers/usb/core/quirks.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 574da2b..2583224 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -57,8 +57,9 @@ static const struct usb_device_id usb_quirk_list[] = {
/* Microsoft LifeCam-VX700 v2.0 */
{ USB_DEVICE(0x045e, 0x0770), .driver_info = USB_QUIRK_RESET_RESUME },
 
-   /* Logitech HD Pro Webcams C920 and C930e */
+   /* Logitech HD Pro Webcams C920, C920-C and C930e */
{ USB_DEVICE(0x046d, 0x082d), .driver_info = USB_QUIRK_DELAY_INIT },
+   { USB_DEVICE(0x046d, 0x0841), .driver_info = USB_QUIRK_DELAY_INIT },
{ USB_DEVICE(0x046d, 0x0843), .driver_info = USB_QUIRK_DELAY_INIT },
 
/* Logitech ConferenceCam CC3000e */
-- 
2.7.4

--
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


Re: [PATCH] usb: Add device quirk for Logitech HD Pro Webcam C920-C

2017-08-25 Thread Dmitry Fleytman

> On 24 Aug 2017, at 10:58 AM, Kai-Heng Feng  
> wrote:
> 
> On Mon, Aug 21, 2017 at 6:03 PM, Dmitry Fleytman  wrote:
>> Commit e0429362ab15
>> ("usb: Add device quirk for Logitech HD Pro Webcams C920 and C930e")
>> introduced quirk to workaround an issue with some Logitech webcams.
>> 
>> Apparently model C920-C has the same issue so applying
>> the same quirk as well.
> 
> I think it's better to also mention "C920-C" in the comment section.


I agree. See v2 (just sent).

Thanks,
Dmitry


> 
>> 
>> See aforementioned commit message for detailed explanation of the problem.
>> 
>> Signed-off-by: Dmitry Fleytman 
>> ---
>> drivers/usb/core/quirks.c | 1 +
>> 1 file changed, 1 insertion(+)
>> 
>> diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
>> index 574da2b..36d4841 100644
>> --- a/drivers/usb/core/quirks.c
>> +++ b/drivers/usb/core/quirks.c
>> @@ -59,6 +59,7 @@ static const struct usb_device_id usb_quirk_list[] = {
>> 
>>/* Logitech HD Pro Webcams C920 and C930e */
>>{ USB_DEVICE(0x046d, 0x082d), .driver_info = USB_QUIRK_DELAY_INIT },
>> +   { USB_DEVICE(0x046d, 0x0841), .driver_info = USB_QUIRK_DELAY_INIT },
>>{ USB_DEVICE(0x046d, 0x0843), .driver_info = USB_QUIRK_DELAY_INIT },
>> 
>>/* Logitech ConferenceCam CC3000e */
>> --
>> 2.7.4
>> 

--
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


Re: ASM1153 detected as ASM1051 and breaking UAS

2017-08-25 Thread Massimo Burcheri
On Thu, 2017-08-24 at 17:24 -0700, Greg KH wrote:

> On Thu, Aug 24, 2017 at 02:05:22PM +0200, Massimo Burcheri wrote:
> > From lsusb -vv:
> > 
> > Bus 004 Device 005: ID 174c:5106 ASMedia Technology Inc. ASM1051 SATA 3Gb/s
> > bridge
> > Device Descriptor:
> >   bLength18
> >   bDescriptorType 1
> >   bcdUSB   3.00
> >   bDeviceClass0 
> >   bDeviceSubClass 0 
> >   bDeviceProtocol 0 
> >   bMaxPacketSize0 9
> >   idVendor   0x174c ASMedia Technology Inc.
> >   idProduct  0x5106 ASM1051 SATA 3Gb/s bridge
> 
> The product id matches that of the ASM1051, so why would the kernel
> ignore what the firmware told it?
> 
> What is the product id that you think this device should be reporting
> instead?

For sure the device chip has written ASM1153 on it and that is exactly matching
the information I got from the manufacturer service:
techsupport...@transcend-info.com
I'm not sure why the idProduct reports something different.
Is there any other obvious difference between this and a real ASM1051?

How can we proceed here? For testing could we force it to be detected as ASM1153
to see if UAS is working?
Would there be any benefit of reading out the device with the native Windows
drivers? At least with these UAS was claimed to be supported, haven't tested
yet.

Best regards,
Massimo

signature.asc
Description: This is a digitally signed message part


Oakley Sunglass Warehouse

2017-08-25 Thread Oakley Sunglass Warehouse
From:   Oakley Sunglass Warehouse
Email:  linux-usb@vger.kernel.org

--

Hi

It's our birthday and we are celebrating 2 years of our outlet.  We'd like to 
offer you only 19.95 USD for all styles of Oakley and Ray Ban Sunglasses. 
Please visit our online store for more details: http://bit.ly/2uGSYYN  


YOU WON'T WANT TO MISS THESE OFFERS


To your success!

Regards, 

Mila

Oakley Sunglass Warehouse

--


--
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


[PATCH 3/3] media: add V4L2_CAP_VDEV_CENTERED flag on vdev-centric drivers

2017-08-25 Thread Mauro Carvalho Chehab
From: Mauro Carvalho Chehab 

Those devices are controlled via their V4L2 device. Add a
flag to indicate them as such.

Signed-off-by: Mauro Carvalho Chehab 
Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/bt8xx/bttv-driver.c  |  4 +++-
 drivers/media/pci/cobalt/cobalt-v4l2.c |  3 ++-
 drivers/media/pci/cx18/cx18-ioctl.c|  4 ++--
 drivers/media/pci/cx23885/cx23885-417.c|  2 +-
 drivers/media/pci/cx23885/cx23885-video.c  |  3 ++-
 drivers/media/pci/cx25821/cx25821-video.c  |  6 --
 drivers/media/pci/cx88/cx88-video.c|  3 ++-
 drivers/media/pci/dt3155/dt3155.c  |  3 ++-
 drivers/media/pci/ivtv/ivtv-ioctl.c|  5 +++--
 drivers/media/pci/meye/meye.c  |  2 +-
 drivers/media/pci/saa7134/saa7134-video.c  |  3 ++-
 drivers/media/pci/saa7164/saa7164-encoder.c|  3 ++-
 drivers/media/pci/saa7164/saa7164-vbi.c|  3 ++-
 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c |  3 ++-
 drivers/media/pci/solo6x10/solo6x10-v4l2.c |  3 ++-
 drivers/media/pci/sta2x11/sta2x11_vip.c|  3 ++-
 drivers/media/pci/tw5864/tw5864-video.c|  2 +-
 drivers/media/pci/tw68/tw68-video.c|  3 ++-
 drivers/media/pci/tw686x/tw686x-video.c|  2 +-
 drivers/media/pci/zoran/zoran_driver.c |  3 ++-
 drivers/media/platform/rcar_drif.c |  3 ++-
 drivers/media/platform/vivid/vivid-core.c  |  2 +-
 drivers/media/usb/airspy/airspy.c  |  3 ++-
 drivers/media/usb/au0828/au0828-video.c|  3 ++-
 drivers/media/usb/cpia2/cpia2_v4l.c|  5 +++--
 drivers/media/usb/cx231xx/cx231xx-video.c  |  5 +++--
 drivers/media/usb/em28xx/em28xx-video.c| 11 +++
 drivers/media/usb/go7007/go7007-v4l2.c |  2 +-
 drivers/media/usb/gspca/gspca.c|  3 ++-
 drivers/media/usb/hackrf/hackrf.c  |  8 +---
 drivers/media/usb/hdpvr/hdpvr-video.c  |  2 +-
 drivers/media/usb/msi2500/msi2500.c|  3 ++-
 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c   |  6 --
 drivers/media/usb/pwc/pwc-v4l.c|  2 +-
 drivers/media/usb/s2255/s2255drv.c |  2 +-
 drivers/media/usb/stk1160/stk1160-v4l.c|  3 ++-
 drivers/media/usb/stkwebcam/stk-webcam.c   |  3 ++-
 drivers/media/usb/tm6000/tm6000-video.c|  5 +++--
 drivers/media/usb/usbtv/usbtv-video.c  |  2 +-
 drivers/media/usb/usbvision/usbvision-video.c  |  5 +++--
 drivers/media/usb/uvc/uvc_v4l2.c   |  8 +---
 drivers/media/usb/zr364xx/zr364xx.c|  5 +++--
 42 files changed, 96 insertions(+), 58 deletions(-)

diff --git a/drivers/media/pci/bt8xx/bttv-driver.c 
b/drivers/media/pci/bt8xx/bttv-driver.c
index 40110be4e986..382cc76b954b 100644
--- a/drivers/media/pci/bt8xx/bttv-driver.c
+++ b/drivers/media/pci/bt8xx/bttv-driver.c
@@ -2481,6 +2481,7 @@ static int bttv_querycap(struct file *file, void  *priv,
V4L2_CAP_VIDEO_CAPTURE |
V4L2_CAP_READWRITE |
V4L2_CAP_STREAMING |
+   V4L2_CAP_VDEV_CENTERED |
V4L2_CAP_DEVICE_CAPS;
if (no_overlay <= 0)
cap->capabilities |= V4L2_CAP_VIDEO_OVERLAY;
@@ -2511,7 +2512,8 @@ static int bttv_querycap(struct file *file, void  *priv,
 V4L2_CAP_STREAMING |
 V4L2_CAP_TUNER);
else {
-   cap->device_caps = V4L2_CAP_RADIO | V4L2_CAP_TUNER;
+   cap->device_caps = V4L2_CAP_RADIO | V4L2_CAP_TUNER |
+  V4L2_CAP_VDEV_CENTERED;
if (btv->has_saa6588)
cap->device_caps |= V4L2_CAP_READWRITE |
V4L2_CAP_RDS_CAPTURE;
diff --git a/drivers/media/pci/cobalt/cobalt-v4l2.c 
b/drivers/media/pci/cobalt/cobalt-v4l2.c
index def4a3b37084..803a9cf09a9f 100644
--- a/drivers/media/pci/cobalt/cobalt-v4l2.c
+++ b/drivers/media/pci/cobalt/cobalt-v4l2.c
@@ -495,7 +495,8 @@ static int cobalt_querycap(struct file *file, void *priv_fh,
strlcpy(vcap->card, "cobalt", sizeof(vcap->card));
snprintf(vcap->bus_info, sizeof(vcap->bus_info),
 "PCIe:%s", pci_name(cobalt->pci_dev));
-   vcap->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_READWRITE;
+   vcap->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_READWRITE |
+   V4L2_CAP_VDEV_CENTERED;
if (s->is_output)
vcap->device_caps |= V4L2_CAP_VIDEO_OUTPUT;
else
diff --git a/drivers/media/pci/cx18/cx18-ioctl.c 
b/drivers/media/pci/cx18/cx18-ioctl.c
index 80b902b12a78..3e258fdc6685 100644
--- a/drivers/media/pci/cx18/cx18-ioctl.c
+++ b/drivers/media/pci/cx18/cx18-ioctl.c
@@ -402,8 +402,8 @@ static int cx18_querycap(struct file *file, void *fh,
snprintf(vcap->bus_info, sizeof(vcap->bus_info),
 "PCI:%s", pci_name(cx->pci_dev));
vcap->capabilities =

[PATCH 0/3] document types of hardware control for V4L2

2017-08-25 Thread Mauro Carvalho Chehab
On 2010, we introduced a new way to control complex V4L2 devices used
on embedded systems, but this was never documented, nor it is possible
for an userspace applicatin to detect the kind of control a device supports.

This series fill the gap.

Mauro Carvalho Chehab (3):
  media: open.rst: document devnode-centric and mc-centric types
  media: videodev2: add a flag for vdev-centric devices
  media: add V4L2_CAP_VDEV_CENTERED flag on vdev-centric drivers

 Documentation/media/uapi/v4l/open.rst| 56 
 Documentation/media/uapi/v4l/vidioc-querycap.rst |  4 ++
 drivers/media/pci/bt8xx/bttv-driver.c|  4 +-
 drivers/media/pci/cobalt/cobalt-v4l2.c   |  3 +-
 drivers/media/pci/cx18/cx18-ioctl.c  |  4 +-
 drivers/media/pci/cx23885/cx23885-417.c  |  2 +-
 drivers/media/pci/cx23885/cx23885-video.c|  3 +-
 drivers/media/pci/cx25821/cx25821-video.c|  6 ++-
 drivers/media/pci/cx88/cx88-video.c  |  3 +-
 drivers/media/pci/dt3155/dt3155.c|  3 +-
 drivers/media/pci/ivtv/ivtv-ioctl.c  |  5 ++-
 drivers/media/pci/meye/meye.c|  2 +-
 drivers/media/pci/saa7134/saa7134-video.c|  3 +-
 drivers/media/pci/saa7164/saa7164-encoder.c  |  3 +-
 drivers/media/pci/saa7164/saa7164-vbi.c  |  3 +-
 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c   |  3 +-
 drivers/media/pci/solo6x10/solo6x10-v4l2.c   |  3 +-
 drivers/media/pci/sta2x11/sta2x11_vip.c  |  3 +-
 drivers/media/pci/tw5864/tw5864-video.c  |  2 +-
 drivers/media/pci/tw68/tw68-video.c  |  3 +-
 drivers/media/pci/tw686x/tw686x-video.c  |  2 +-
 drivers/media/pci/zoran/zoran_driver.c   |  3 +-
 drivers/media/platform/rcar_drif.c   |  3 +-
 drivers/media/platform/vivid/vivid-core.c|  2 +-
 drivers/media/usb/airspy/airspy.c|  3 +-
 drivers/media/usb/au0828/au0828-video.c  |  3 +-
 drivers/media/usb/cpia2/cpia2_v4l.c  |  5 ++-
 drivers/media/usb/cx231xx/cx231xx-video.c|  5 ++-
 drivers/media/usb/em28xx/em28xx-video.c  | 11 +++--
 drivers/media/usb/go7007/go7007-v4l2.c   |  2 +-
 drivers/media/usb/gspca/gspca.c  |  3 +-
 drivers/media/usb/hackrf/hackrf.c|  8 ++--
 drivers/media/usb/hdpvr/hdpvr-video.c|  2 +-
 drivers/media/usb/msi2500/msi2500.c  |  3 +-
 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c |  6 ++-
 drivers/media/usb/pwc/pwc-v4l.c  |  2 +-
 drivers/media/usb/s2255/s2255drv.c   |  2 +-
 drivers/media/usb/stk1160/stk1160-v4l.c  |  3 +-
 drivers/media/usb/stkwebcam/stk-webcam.c |  3 +-
 drivers/media/usb/tm6000/tm6000-video.c  |  5 ++-
 drivers/media/usb/usbtv/usbtv-video.c|  2 +-
 drivers/media/usb/usbvision/usbvision-video.c|  5 ++-
 drivers/media/usb/uvc/uvc_v4l2.c |  8 ++--
 drivers/media/usb/zr364xx/zr364xx.c  |  5 ++-
 include/uapi/linux/videodev2.h   |  2 +
 45 files changed, 158 insertions(+), 58 deletions(-)

-- 
2.13.3


--
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


[bug report] usb: phy: Add USB charger support

2017-08-25 Thread Dan Carpenter
Hello Baolin Wang,

This is a semi-automatic email about new static checker warnings.

The patch a9081a008f84: "usb: phy: Add USB charger support" from Aug 
15, 2017, leads to the following Smatch complaint:

include/linux/usb/phy.h:327 usb_phy_set_power()
 warn: variable dereferenced before check 'x' (see line 325)

include/linux/usb/phy.h
   322  static inline int
   323  usb_phy_set_power(struct usb_phy *x, unsigned mA)
   324  {
   325  usb_phy_set_charger_current(x, mA);
^
The patch adds an unchecked dereference.

   326  
   327  if (x && x->set_power)
^
The existing code checks for NULL.  But so far as I know non of the
existing caller pass a NULL usb_phy and it doesn't really make sense
to me to do that.  Perhaps just remove the NULL check?

   328  return x->set_power(x, mA);
   329  return 0;

regards,
dan carpenter
--
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


[PATCH] cdc_ncm: flag the ublox TOBY-L4 as wwan

2017-08-25 Thread Aleksander Morgado
Signed-off-by: Aleksander Morgado 
---
 drivers/net/usb/cdc_ncm.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 811b18215cae..47cab1bde065 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -1758,6 +1758,13 @@ static const struct usb_device_id cdc_devs[] = {
  .driver_info = (unsigned long)&wwan_noarp_info,
},
 
+   /* u-blox TOBY-L4 */
+   { USB_DEVICE_AND_INTERFACE_INFO(0x1546, 0x1010,
+   USB_CLASS_COMM,
+   USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE),
+ .driver_info = (unsigned long)&wwan_info,
+   },
+
/* Generic CDC-NCM devices */
{ USB_INTERFACE_INFO(USB_CLASS_COMM,
USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE),
-- 
2.14.1

--
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


Re: [PATCH] cdc_ncm: flag the ublox TOBY-L4 as wwan

2017-08-25 Thread Greg KH
On Fri, Aug 25, 2017 at 02:59:46PM +0200, Aleksander Morgado wrote:
> Signed-off-by: Aleksander Morgado 
> ---
>  drivers/net/usb/cdc_ncm.c | 7 +++
>  1 file changed, 7 insertions(+)

Personally, I require patches to have changelog texts in them...
--
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


Re: ASM1153 detected as ASM1051 and breaking UAS

2017-08-25 Thread Greg KH
On Fri, Aug 25, 2017 at 09:43:26AM +0200, Massimo Burcheri wrote:
> On Thu, 2017-08-24 at 17:24 -0700, Greg KH wrote:
> 
> > On Thu, Aug 24, 2017 at 02:05:22PM +0200, Massimo Burcheri wrote:
> > > From lsusb -vv:
> > > 
> > > Bus 004 Device 005: ID 174c:5106 ASMedia Technology Inc. ASM1051 SATA 
> > > 3Gb/s
> > > bridge
> > > Device Descriptor:
> > >   bLength18
> > >   bDescriptorType 1
> > >   bcdUSB   3.00
> > >   bDeviceClass0 
> > >   bDeviceSubClass 0 
> > >   bDeviceProtocol 0 
> > >   bMaxPacketSize0 9
> > >   idVendor   0x174c ASMedia Technology Inc.
> > >   idProduct  0x5106 ASM1051 SATA 3Gb/s bridge
> > 
> > The product id matches that of the ASM1051, so why would the kernel
> > ignore what the firmware told it?
> > 
> > What is the product id that you think this device should be reporting
> > instead?
> 
> For sure the device chip has written ASM1153 on it and that is exactly 
> matching
> the information I got from the manufacturer service:
> techsupport...@transcend-info.com
> I'm not sure why the idProduct reports something different.
> Is there any other obvious difference between this and a real ASM1051?

I have no idea, all the operating system can do is go off of the product
id.

> How can we proceed here? For testing could we force it to be detected as 
> ASM1153
> to see if UAS is working?

Try it.

> Would there be any benefit of reading out the device with the native Windows
> drivers? At least with these UAS was claimed to be supported, haven't tested
> yet.

Try testing it to see if it really shows up as the "new" device...

good luck!

greg k-h
--
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


Re: [PATCH] cdc_ncm: flag the ublox TOBY-L4 as wwan

2017-08-25 Thread Aleksander Morgado
On Fri, Aug 25, 2017 at 3:22 PM, Greg KH  wrote:
> On Fri, Aug 25, 2017 at 02:59:46PM +0200, Aleksander Morgado wrote:
>> Signed-off-by: Aleksander Morgado 
>> ---
>>  drivers/net/usb/cdc_ncm.c | 7 +++
>>  1 file changed, 7 insertions(+)
>
> Personally, I require patches to have changelog texts in them...

Sure, will push a v2 with more info.

-- 
Aleksander
https://aleksander.es
--
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


Re: [PATCH 02/15] drm: make device_type const

2017-08-25 Thread Daniel Vetter
On Sat, Aug 19, 2017 at 01:52:13PM +0530, Bhumika Goyal wrote:
> Make these const as they are only stored in the type field of a device
> structure, which is const.
> Done using Coccinelle.

I can't apply this, it's missing your s-o-b line. You can just replay with
that.

Thanks, Daniel

> ---
>  drivers/gpu/drm/drm_sysfs.c  | 2 +-
>  drivers/gpu/drm/ttm/ttm_module.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
> index 1c5b5ce..84e4ebe 100644
> --- a/drivers/gpu/drm/drm_sysfs.c
> +++ b/drivers/gpu/drm/drm_sysfs.c
> @@ -39,7 +39,7 @@
>   * drm_connector_unregister().
>   */
>  
> -static struct device_type drm_sysfs_device_minor = {
> +static const struct device_type drm_sysfs_device_minor = {
>   .name = "drm_minor"
>  };
>  
> diff --git a/drivers/gpu/drm/ttm/ttm_module.c 
> b/drivers/gpu/drm/ttm/ttm_module.c
> index 66fc639..e6604e0 100644
> --- a/drivers/gpu/drm/ttm/ttm_module.c
> +++ b/drivers/gpu/drm/ttm/ttm_module.c
> @@ -37,7 +37,7 @@
>  static DECLARE_WAIT_QUEUE_HEAD(exit_q);
>  static atomic_t device_released;
>  
> -static struct device_type ttm_drm_class_type = {
> +static const struct device_type ttm_drm_class_type = {
>   .name = "ttm",
>   /**
>* Add pm ops here.
> -- 
> 1.9.1
> 
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
--
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


[PATCH v2] cdc_ncm: flag the u-blox TOBY-L4 as wwan

2017-08-25 Thread Aleksander Morgado
The u-blox TOBY-L4 is a LTE Advanced (Cat 6) module with HSPA+ and 2G
fallback.

Unlike the TOBY-L2, this module has one single USB layout and exposes
several TTYs for control and a NCM interface for data. Connecting this
module may be done just by activating the desired PDP context with
'AT+CGACT=1,' and then running DHCP on the NCM interface.

Signed-off-by: Aleksander Morgado 
---
 drivers/net/usb/cdc_ncm.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 811b18215cae..47cab1bde065 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -1758,6 +1758,13 @@ static const struct usb_device_id cdc_devs[] = {
  .driver_info = (unsigned long)&wwan_noarp_info,
},

+   /* u-blox TOBY-L4 */
+   { USB_DEVICE_AND_INTERFACE_INFO(0x1546, 0x1010,
+   USB_CLASS_COMM,
+   USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE),
+ .driver_info = (unsigned long)&wwan_info,
+   },
+
/* Generic CDC-NCM devices */
{ USB_INTERFACE_INFO(USB_CLASS_COMM,
USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE),
--
2.14.1
--
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


[PATCH trivial] dt-bindings: usb: musb: Grammar s/the/to/, s/is/are/

2017-08-25 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven 
---
 Documentation/devicetree/bindings/usb/am33xx-usb.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/am33xx-usb.txt 
b/Documentation/devicetree/bindings/usb/am33xx-usb.txt
index 20c2ff2ba07ebd3f..16920d78e1b8b9d3 100644
--- a/Documentation/devicetree/bindings/usb/am33xx-usb.txt
+++ b/Documentation/devicetree/bindings/usb/am33xx-usb.txt
@@ -4,9 +4,9 @@
 - reg: offset and length of the usbss register sets
 - ti,hwmods : must be "usb_otg_hs"
 
-The glue layer contains multiple child nodes. It is required the have
+The glue layer contains multiple child nodes. It is required to have
 at least a control module node, USB node and a PHY node. The second USB
-node and its PHY node is optional. The DMA node is also optional.
+node and its PHY node are optional. The DMA node is also optional.
 
 Reset module
 
-- 
2.7.4

--
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


[PATCH] usb: dwc3: Initialize DMA ops/mask for xhci-hcd

2017-08-25 Thread Adam Wallis
The dma ops from the parent DWC device are not getting passed to the
child xhci-hcd device. This patch makes use of
platform_device_register_full to set the DMA ops. For the DT/OF case,
dma_ops were still null after the the device register, so
of_dma_configure is called in only the OF case.

Signed-off-by: Adam Wallis 
---
 drivers/usb/dwc3/host.c | 39 +--
 1 file changed, 17 insertions(+), 22 deletions(-)

diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
index 76f0b0d..662e9e2 100644
--- a/drivers/usb/dwc3/host.c
+++ b/drivers/usb/dwc3/host.c
@@ -16,6 +16,7 @@
  */
 
 #include 
+#include 
 
 #include "core.h"
 
@@ -56,6 +57,7 @@ int dwc3_host_init(struct dwc3 *dwc)
 {
struct property_entry   props[3];
struct platform_device  *xhci;
+   struct platform_device_info dwc_plat_info = {};
int ret, irq;
struct resource *res;
struct platform_device  *dwc3_pdev = to_platform_device(dwc->dev);
@@ -79,22 +81,22 @@ int dwc3_host_init(struct dwc3 *dwc)
dwc->xhci_resources[1].flags = res->flags;
dwc->xhci_resources[1].name = res->name;
 
-   xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO);
-   if (!xhci) {
-   dev_err(dwc->dev, "couldn't allocate xHCI device\n");
-   return -ENOMEM;
-   }
+   dwc_plat_info.name = "xhci-hcd";
+   dwc_plat_info.parent = dwc->dev;
+   dwc_plat_info.res = dwc->xhci_resources;
+   dwc_plat_info.num_res = DWC3_XHCI_RESOURCES_NUM;
+   dwc_plat_info.fwnode = dwc->dev->fwnode;
+   dwc_plat_info.dma_mask = *dwc->dev->dma_mask;
 
-   xhci->dev.parent= dwc->dev;
+   xhci = platform_device_register_full(&dwc_plat_info);
+   if (IS_ERR(xhci)) {
+   dev_err(dwc->dev, "failed to register xHCI device\n");
+   return PTR_ERR(xhci);
+   }
 
dwc->xhci = xhci;
-
-   ret = platform_device_add_resources(xhci, dwc->xhci_resources,
-   DWC3_XHCI_RESOURCES_NUM);
-   if (ret) {
-   dev_err(dwc->dev, "couldn't add resources to xHCI device\n");
-   goto err1;
-   }
+   if (dwc->dev->of_node)
+   of_dma_configure(&xhci->dev, dwc->dev->of_node);
 
memset(props, 0, sizeof(struct property_entry) * ARRAY_SIZE(props));
 
@@ -117,7 +119,7 @@ int dwc3_host_init(struct dwc3 *dwc)
ret = platform_device_add_properties(xhci, props);
if (ret) {
dev_err(dwc->dev, "failed to add properties to xHCI\n");
-   goto err1;
+   goto err;
}
}
 
@@ -126,19 +128,12 @@ int dwc3_host_init(struct dwc3 *dwc)
phy_create_lookup(dwc->usb3_generic_phy, "usb3-phy",
  dev_name(dwc->dev));
 
-   ret = platform_device_add(xhci);
-   if (ret) {
-   dev_err(dwc->dev, "failed to register xHCI device\n");
-   goto err2;
-   }
-
return 0;
-err2:
+err:
phy_remove_lookup(dwc->usb2_generic_phy, "usb2-phy",
  dev_name(dwc->dev));
phy_remove_lookup(dwc->usb3_generic_phy, "usb3-phy",
  dev_name(dwc->dev));
-err1:
platform_device_put(xhci);
return ret;
 }
-- 
Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.

--
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


Re: [PATCH 13/15] scsi: make device_type const

2017-08-25 Thread Martin K. Petersen

Bhumika,

> Make these const as they are only stored in the type field of a device
> structure, which is const.

Applied to 4.14/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering
--
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


Re: [PATCH trivial] dt-bindings: usb: musb: Grammar s/the/to/, s/is/are/

2017-08-25 Thread Rob Herring
On Fri, Aug 25, 2017 at 04:38:26PM +0200, Geert Uytterhoeven wrote:
> Signed-off-by: Geert Uytterhoeven 
> ---
>  Documentation/devicetree/bindings/usb/am33xx-usb.txt | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied.

Rob
--
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


Re: [PATCH] usb: dwc3: Initialize DMA ops/mask for xhci-hcd

2017-08-25 Thread Grygorii Strashko



On 08/25/2017 01:02 PM, Adam Wallis wrote:

The dma ops from the parent DWC device are not getting passed to the
child xhci-hcd device. This patch makes use of
platform_device_register_full to set the DMA ops. For the DT/OF case,
dma_ops were still null after the the device register, so
of_dma_configure is called in only the OF case.

Signed-off-by: Adam Wallis 


Hm. There were set of fixes in this area recently which actually removed
settings you are going to restore

4c39d4b usb: xhci: use bus->sysdev for DMA configuration

d64ff40 usb: dwc3: use bus->sysdev for DMA configuration


---
  drivers/usb/dwc3/host.c | 39 +--
  1 file changed, 17 insertions(+), 22 deletions(-)

diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
index 76f0b0d..662e9e2 100644
--- a/drivers/usb/dwc3/host.c
+++ b/drivers/usb/dwc3/host.c
@@ -16,6 +16,7 @@
   */
  
  #include 

+#include 
  
  #include "core.h"
  
@@ -56,6 +57,7 @@ int dwc3_host_init(struct dwc3 *dwc)

  {
struct property_entry   props[3];
struct platform_device  *xhci;
+   struct platform_device_info dwc_plat_info = {};
int ret, irq;
struct resource *res;
struct platform_device  *dwc3_pdev = to_platform_device(dwc->dev);
@@ -79,22 +81,22 @@ int dwc3_host_init(struct dwc3 *dwc)
dwc->xhci_resources[1].flags = res->flags;
dwc->xhci_resources[1].name = res->name;
  
-	xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO);

-   if (!xhci) {
-   dev_err(dwc->dev, "couldn't allocate xHCI device\n");
-   return -ENOMEM;
-   }
+   dwc_plat_info.name = "xhci-hcd";
+   dwc_plat_info.parent = dwc->dev;
+   dwc_plat_info.res = dwc->xhci_resources;
+   dwc_plat_info.num_res = DWC3_XHCI_RESOURCES_NUM;
+   dwc_plat_info.fwnode = dwc->dev->fwnode;
+   dwc_plat_info.dma_mask = *dwc->dev->dma_mask;
  
-	xhci->dev.parent	= dwc->dev;

+   xhci = platform_device_register_full(&dwc_plat_info);
+   if (IS_ERR(xhci)) {
+   dev_err(dwc->dev, "failed to register xHCI device\n");
+   return PTR_ERR(xhci);
+   }
  
  	dwc->xhci = xhci;

-
-   ret = platform_device_add_resources(xhci, dwc->xhci_resources,
-   DWC3_XHCI_RESOURCES_NUM);
-   if (ret) {
-   dev_err(dwc->dev, "couldn't add resources to xHCI device\n");
-   goto err1;
-   }
+   if (dwc->dev->of_node)
+   of_dma_configure(&xhci->dev, dwc->dev->of_node);
  
  	memset(props, 0, sizeof(struct property_entry) * ARRAY_SIZE(props));
  
@@ -117,7 +119,7 @@ int dwc3_host_init(struct dwc3 *dwc)

ret = platform_device_add_properties(xhci, props);
if (ret) {
dev_err(dwc->dev, "failed to add properties to xHCI\n");
-   goto err1;
+   goto err;
}
}
  
@@ -126,19 +128,12 @@ int dwc3_host_init(struct dwc3 *dwc)

phy_create_lookup(dwc->usb3_generic_phy, "usb3-phy",
  dev_name(dwc->dev));
  
-	ret = platform_device_add(xhci);

-   if (ret) {
-   dev_err(dwc->dev, "failed to register xHCI device\n");
-   goto err2;
-   }
-
return 0;
-err2:
+err:
phy_remove_lookup(dwc->usb2_generic_phy, "usb2-phy",
  dev_name(dwc->dev));
phy_remove_lookup(dwc->usb3_generic_phy, "usb3-phy",
  dev_name(dwc->dev));
-err1:
platform_device_put(xhci);
return ret;
  }



--
regards,
-grygorii
--
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


Re: [PATCH 1/3] usb: dwc2: Improve gadget state disconnection handling

2017-08-25 Thread John Stultz
On Thu, Aug 17, 2017 at 12:03 PM, John Stultz  wrote:
> In the earlier commit dad3f793f20f ("usb: dwc2: Make sure we
> disconnect the gadget state"), I was trying to fix up the
> fact that we somehow weren't disconnecting the gadget state,
> so that when the OTG port was plugged in the second time we
> would get warnings about the state tracking being wrong.
>
> The fix there was somewhat simple, as it just made sure to
> call dwc2_hsotg_disconnect() before we connected things up
> in OTG mode.
>
> But in looking at a different issue I was seeing with UDC
> state handling, I realized that it would be much better
> to call dwc2_hsotg_disconnect when we get the state change
> signal moving to host mode.
>
> Thus, this patch removes the earlier disconnect call I added
> and moves it (and the needed locking) to the host mode
> transition.

Ping? I don't mean to be a bother, but any thoughts on this patchset?

thanks
-john
--
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