From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751488AbbERPGO (ORCPT ); Mon, 18 May 2015 11:06:14 -0400 Received: from muru.com ([72.249.23.125]:51816 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752396AbbERPGK (ORCPT ); Mon, 18 May 2015 11:06:10 -0400 Date: Mon, 18 May 2015 08:06:07 -0700 From: Tony Lindgren To: Arnd Bergmann Cc: Pali =?utf-8?B?Um9ow6Fy?= , =?utf-8?Q?Beno=C3=AEt?= Cousson , Ulf Hansson , linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org Subject: Re: [PATCH 1/2] mmc: omap_hsmmc: Add support for slot-name property in DT Message-ID: <20150518150607.GD10274@atomide.com> References: <1431724489-32359-1-git-send-email-pali.rohar@gmail.com> <2523437.y90mKuWhc3@wuerfel> <201505152322.37739@pali> <3099867.Z5GbY7oWl2@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3099867.Z5GbY7oWl2@wuerfel> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Arnd Bergmann [150515 14:26]: > On Friday 15 May 2015 23:22:37 Pali Rohár wrote: > > On Friday 15 May 2015 23:19:44 Arnd Bergmann wrote: > > > On Friday 15 May 2015 23:14:48 Pali Rohár wrote: > > > > diff --git a/drivers/mmc/host/omap_hsmmc.c > > > > b/drivers/mmc/host/omap_hsmmc.c index 9df2b68..f6073dd 100644 > > > > --- a/drivers/mmc/host/omap_hsmmc.c > > > > +++ b/drivers/mmc/host/omap_hsmmc.c > > > > @@ -1901,6 +1901,8 @@ static struct omap_hsmmc_platform_data > > > > *of_get_hsmmc_pdata(struct device *dev) > > > > > > > > if (of_find_property(np, "ti,needs-special-hs-handling", > > > > NULL)) > > > > > > > > pdata->features |= HSMMC_HAS_HSPE_SUPPORT; > > > > > > > > + of_property_read_string(np, "slot-name", &pdata->name); > > > > + > > > > > > > > return pdata; > > > > > > > > } > > > > > > This property needs to be documented in > > > Documentation/devicetree/bindings/mmc/mmc.txt and preferably the > > > implementation moved into mmc_of_parse. > > > > > > We should not have an interface like this specific to one driver. > > > > > > Arnd > > > > Interface is already present for platform data code (which do not use > > DT). So "pdata->name" is not DT specific... > > > > The driver can of course keep providing the name from platform_data where > that is used. All I was saying is that when you introduce a DT property, > it should not be specific to that driver. Yes sounds like it would be a usable generic binding. Not sure that it should be called slot-name though, maybe you can use the MMC driver instance name instead? I don't think much any drivers support multiple MMC slots although it's in the original MMC spec. If setting up the generic binding is expected to take a while, you can naturally pass it in pdata while waiting for the generic binding to get merged. Regards, Tony