All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Reichel <sre@kernel.org>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>, Arnd Bergmann <arnd@arndb.de>,
	linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
	Pavel Machek <pavel@ucw.cz>,
	Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>,
	Aaro Koskinen <aaro.koskinen@iki.fi>
Subject: Re: [PATCH 0/4] Drop legacy support for omap3517
Date: Sun, 25 Jan 2015 16:18:49 +0100	[thread overview]
Message-ID: <20150125151848.GF2719@earth.universe> (raw)
In-Reply-To: <201501241300.00723@pali>

[-- Attachment #1: Type: text/plain, Size: 1725 bytes --]

On Sat, Jan 24, 2015 at 01:00:00PM +0100, Pali Rohár wrote:
> Another regression for DT setup (which does not occur for board code):
> 
> omap_hsmmc driver does not export slot_name sysfs entry because
> it not supported by DT yet. Entry slot_name is used by userspace
> application to determinate if mmc block device is internal eMMC
> memory or external uSD card. So support for this property also in
> DT is needed.
> 
> Here is simple patch which fix this problem:
> 
> diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
> index 8571027..31ca609 100644
> --- a/arch/arm/boot/dts/omap3-n900.dts
> +++ b/arch/arm/boot/dts/omap3-n900.dts
> @@ -665,6 +665,7 @@
>  };
>  
>  &mmc1 {
> +	slot-name = "external";
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&mmc1_pins>;
>  	vmmc-supply = <&vmmc1>;
> @@ -674,6 +675,7 @@
>  
>  /* most boards use vaux3, only some old versions use vmmc2 instead */
>  &mmc2 {
> +	slot-name = "internal";
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&mmc2_pins>;
>  	vmmc-supply = <&vaux3>;
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 7c71dcd..cd189eb 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -2021,6 +2021,8 @@ static struct omap_hsmmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
>  	if (of_find_property(np, "enable-sdio-wakeup", NULL))
>  		pdata->pm_caps |= MMC_PM_WAKE_SDIO_IRQ;
>  
> +	of_property_read_string(np, "slot-name", &pdata->name);
> +
>  	return pdata;
>  }
>  #else

I suggest to use "label" as DT property name, which is also used for
labeling GPIOs, LEDs, partitions, ... in DT.

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: sre@kernel.org (Sebastian Reichel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/4] Drop legacy support for omap3517
Date: Sun, 25 Jan 2015 16:18:49 +0100	[thread overview]
Message-ID: <20150125151848.GF2719@earth.universe> (raw)
In-Reply-To: <201501241300.00723@pali>

On Sat, Jan 24, 2015 at 01:00:00PM +0100, Pali Roh?r wrote:
> Another regression for DT setup (which does not occur for board code):
> 
> omap_hsmmc driver does not export slot_name sysfs entry because
> it not supported by DT yet. Entry slot_name is used by userspace
> application to determinate if mmc block device is internal eMMC
> memory or external uSD card. So support for this property also in
> DT is needed.
> 
> Here is simple patch which fix this problem:
> 
> diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
> index 8571027..31ca609 100644
> --- a/arch/arm/boot/dts/omap3-n900.dts
> +++ b/arch/arm/boot/dts/omap3-n900.dts
> @@ -665,6 +665,7 @@
>  };
>  
>  &mmc1 {
> +	slot-name = "external";
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&mmc1_pins>;
>  	vmmc-supply = <&vmmc1>;
> @@ -674,6 +675,7 @@
>  
>  /* most boards use vaux3, only some old versions use vmmc2 instead */
>  &mmc2 {
> +	slot-name = "internal";
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&mmc2_pins>;
>  	vmmc-supply = <&vaux3>;
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 7c71dcd..cd189eb 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -2021,6 +2021,8 @@ static struct omap_hsmmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
>  	if (of_find_property(np, "enable-sdio-wakeup", NULL))
>  		pdata->pm_caps |= MMC_PM_WAKE_SDIO_IRQ;
>  
> +	of_property_read_string(np, "slot-name", &pdata->name);
> +
>  	return pdata;
>  }
>  #else

I suggest to use "label" as DT property name, which is also used for
labeling GPIOs, LEDs, partitions, ... in DT.

-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150125/e97be3c8/attachment.sig>

  parent reply	other threads:[~2015-01-25 15:18 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13 17:57 [PATCH 0/4] Drop legacy support for omap3517 Tony Lindgren
2015-01-13 17:57 ` Tony Lindgren
2015-01-13 17:57 ` [PATCH 1/4] ARM: OMAP3: Remove legacy support for am3517-evm Tony Lindgren
2015-01-13 17:57   ` Tony Lindgren
2015-01-13 17:57 ` [PATCH 2/4] ARM: OMAP3: Remove legacy support for am3517crane Tony Lindgren
2015-01-13 17:57   ` Tony Lindgren
2015-01-13 17:57 ` [PATCH 3/4] ARM: OMAP3: Remove cm-t3517 legacy support Tony Lindgren
2015-01-13 17:57   ` Tony Lindgren
2015-01-13 17:57 ` [PATCH 4/4] ARM: OMAP3: Remove legacy support for am35xx-emac Tony Lindgren
2015-01-13 17:57   ` Tony Lindgren
2015-01-13 20:24 ` [PATCH 0/4] Drop legacy support for omap3517 Arnd Bergmann
2015-01-13 20:24   ` Arnd Bergmann
2015-01-13 20:42   ` Tony Lindgren
2015-01-13 20:42     ` Tony Lindgren
2015-01-13 20:50     ` Pali Rohár
2015-01-13 20:50       ` Pali Rohár
2015-01-18 21:02       ` Pavel Machek
2015-01-18 21:02         ` Pavel Machek
2015-01-18 22:29         ` Sebastian Reichel
2015-01-18 22:29           ` Sebastian Reichel
2015-01-15 14:25     ` Sebastian Reichel
2015-01-15 14:25       ` Sebastian Reichel
2015-01-24 12:00       ` Pali Rohár
2015-01-24 12:00         ` Pali Rohár
2015-01-24 22:08         ` Arnd Bergmann
2015-01-24 22:08           ` Arnd Bergmann
2015-01-24 22:14           ` Pali Rohár
2015-01-24 22:14             ` Pali Rohár
2015-01-26 10:16             ` Arnd Bergmann
2015-01-26 10:16               ` Arnd Bergmann
2015-01-25 21:23           ` Pavel Machek
2015-01-25 21:23             ` Pavel Machek
2015-01-25 15:18         ` Sebastian Reichel [this message]
2015-01-25 15:18           ` Sebastian Reichel
2015-01-25 21:22         ` Pavel Machek
2015-01-25 21:22           ` Pavel Machek
2015-01-25 21:49           ` Sebastian Reichel
2015-01-25 21:49             ` Sebastian Reichel

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=20150125151848.GF2719@earth.universe \
    --to=sre@kernel.org \
    --cc=aaro.koskinen@iki.fi \
    --cc=arnd@arndb.de \
    --cc=ivo.g.dimitrov.75@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=tony@atomide.com \
    /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.