lkml.org 
[lkml]   [2016]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v12 2/4] gadget: Support for the usb charger framework
Date

Hi,

Felipe Balbi <balbi@kernel.org> writes:
>>>>>>>>> Can't you just tie a charger to a UDC and avoid the charger class
>>>>>>>>> completely?
>>>>>>>>
>>>>>>>> Yeah, I also hope so. But we really want something to manage the
>>>>>>>> charger devices, do you have any good suggestion to avoid the 'class'
>>>>>>>> but also can manage the charger devices?
>>>>>>>
>>>>>>> manage in what way? It seems to me that they don't need to be real
>>>>>>> devices, just a handle as part of struct usb_gadget, no?
>>>>>>
>>>>>> Although charger device is not one real hardware device, we also use
>>>>>> one 'struct device' to describe it in charger.c file. So we should
>>>>>> manage the 'struct device' with one proper way.
>>>>>
>>>>> that's fine, but why do you think they need a struct device to start with?
>>>>
>>>> We can get/put usb charger and mange usb charger attributes with the
>>>> device model if we use a struct device.
>>>
>>> We already have that as part of struct usb_udc. Why don't you just
>>> create a subdirectory called charger which will hold all your
>>> charger-related attributes. That directory will only be created if a
>>> valid ->charger pointer exists.
>>
>> That means we can remove all the device and class things in charger.c
>> file, right? OK, I try to do that. Thanks.
>
> right. Keep your charger.c file, because to conditionally compile and
^
we want

> link that to udc-core.ko, but remove all the class initialization and
> all of that extra code.
>
> --
> balbi

--
balbi
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2016-06-21 16:01    [W:0.073 / U:0.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site