From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932085AbdEQQCC (ORCPT ); Wed, 17 May 2017 12:02:02 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:35823 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753672AbdEQQB7 (ORCPT ); Wed, 17 May 2017 12:01:59 -0400 Date: Wed, 17 May 2017 18:01:52 +0200 From: Krzysztof Kozlowski To: Richard Leitner Cc: Linux USB List , "linux-kernel@vger.kernel.org" , Greg Kroah-Hartman , Javier Martinez Canillas , Richard Leitner , Stephen Boyd Subject: Re: Microchip USB Hub Driver Harmonization Message-ID: <20170517160152.t34t43ocbzebpkfg@kozik-lap> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 17, 2017 at 12:58:38PM +0200, Richard Leitner wrote: > Hello, > due to the fact (all?) the Microchip (former SMSC) USB hubs share the > same I2C configuration interface, I'm currently working on harmonizing > those USB Hub drivers. Currently this affects the usb251xb, usb3503 and > usb4604 drivers. To avoid preventable efforts (and patch versions) I > have some question on the preferred implementation: > > 1. Currently usb251xb uses i2c_smbus_*, usb3503 uses regmap_* and > usb4604 uses i2c_master_* functions for the hub configuration. What > would be the preferred solution? regmap? It is already widely used for I2C drivers. I think most (or even all?) new I2C drivers use regmap. It hides the real bus between common regmap API. > 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". > 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 Best regards, Krzysztof