All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Richard Leitner <me@g0hl1n.net>
Cc: Richard Leitner <richard.leitner@skidata.com>,
	Linux USB List <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Javier Martinez Canillas <javier@osg.samsung.com>,
	Richard Leitner <dev@g0hl1n.net>,
	Stephen Boyd <stephen.boyd@linaro.org>
Subject: Re: Microchip USB Hub Driver Harmonization
Date: Thu, 18 May 2017 09:46:56 +0200	[thread overview]
Message-ID: <CAJKOXPdG87771-nOaGsCBPZhuvoPHe4Jo8R0bQ+yKODaHQAi9g@mail.gmail.com> (raw)
In-Reply-To: <3f2206e3-8b25-c6d7-505a-d4bb2fb5d66a@g0hl1n.net>

On Thu, May 18, 2017 at 7:33 AM, Richard Leitner <me@g0hl1n.net> wrote:
>>> 2. What would be a good prefix for common headers/functions/macros/etc.?
>>> I thought of "mcusbhub"... Would that be OK? Or are there any
>>> conventions/better proposals on that?
>>
>>
>> If you are going to develop one driver for entire family, then you could
>> even choose just one name. Let's say the most generic.
>>
>> I don't quite understand the meaning behind "harmonizing drivers".
>
>
> I'm currently evaluating if it is feasible to create one common driver for
> all USBxxxx hubs. Due to the fact there are currently only 3 hub types
> implemented mainline (the Microchip homepage lists 36 USB Hub products [1])
> it involves quite a lot data-sheet reading ;-)
>
> As a first step (and also the final one if implementing a common driver is
> not feasible) I thought of creating a common header/source file which
> implements all "re-useable" functions/macros/etc. Would that also be an
> accepted solution?

I understand. It is fine with me. You could make common part in few ways, e.g.:
1. prepare re-usable functions etc (as you said),
2. create one driver core (with init/probe/remove/exit etc) which
delegates most of the body to specific handlers around.

The benefit of the second approach is that one sees immediately that
there is one driver for entire family.


>>> 3. Currently only usb3503 supports "platform data". Is this still needed
>>> or may it be removed?
>>
>>
>> I think it is still used, e.g. by:
>> arch/arm/boot/dts/exynos5250-spring.dts
>
>
> Please correct me if I'm wrong, but isn't that DT only?
>
> The reason why I'm asking if it may be removed is because the only file
> including "linux/platform_data/usb3503.h" is the usb3503.c driver itself and
> it's also the only file using "struct usb3503_platform_data".

Ah yes, my mistake. I understood that you are asking about "platform
driver", not "platform data". From my perspective all boards use DT so
there is no platform data. In other drivers I found that some folks
from x86 world use SFI/platform_data but I do not know if it applies
here. Anyway removing platform data is fine with me.

Best regards,
Krzysztof

      reply	other threads:[~2017-05-18  7:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-17 10:58 Microchip USB Hub Driver Harmonization Richard Leitner
2017-05-17 16:01 ` Krzysztof Kozlowski
2017-05-18  5:33   ` Richard Leitner
2017-05-18  7:46     ` Krzysztof Kozlowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJKOXPdG87771-nOaGsCBPZhuvoPHe4Jo8R0bQ+yKODaHQAi9g@mail.gmail.com \
    --to=krzk@kernel.org \
    --cc=dev@g0hl1n.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=javier@osg.samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=me@g0hl1n.net \
    --cc=richard.leitner@skidata.com \
    --cc=stephen.boyd@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.