* [PATCH] mmc: mxs-mmc: Add wp-inverted property
@ 2012-05-21 3:36 Marek Vasut
2012-05-21 3:45 ` Chris Ball
0 siblings, 1 reply; 10+ messages in thread
From: Marek Vasut @ 2012-05-21 3:36 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Marek Vasut, Shawn Guo, Fabio Estevam, linux-mmc, Chris Ball
The write-protect GPIO is inverted on some boards. Handle such case.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: linux-mmc@vger.kernel.org
Cc: Chris Ball <cjb@laptop.org>
---
Documentation/devicetree/bindings/mmc/mxs-mmc.txt | 1 +
drivers/mmc/host/mxs-mmc.c | 11 ++++++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
V2: Adjust the subject, Cc linux-mmc
diff --git a/Documentation/devicetree/bindings/mmc/mxs-mmc.txt b/Documentation/devicetree/bindings/mmc/mxs-mmc.txt
index 14d870a..0a7d2cd 100644
--- a/Documentation/devicetree/bindings/mmc/mxs-mmc.txt
+++ b/Documentation/devicetree/bindings/mmc/mxs-mmc.txt
@@ -13,6 +13,7 @@ Required properties:
Optional properties:
- wp-gpios: Specify GPIOs for write protection
+- wp-inverted: Set if the write protection GPIO is inverted
Examples:
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index 277161d..119beb9 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -164,16 +164,23 @@ struct mxs_mmc_host {
spinlock_t lock;
int sdio_irq_en;
int wp_gpio;
+ int wp_inverted:1;
};
static int mxs_mmc_get_ro(struct mmc_host *mmc)
{
struct mxs_mmc_host *host = mmc_priv(mmc);
+ int ret;
if (!gpio_is_valid(host->wp_gpio))
return -EINVAL;
- return gpio_get_value(host->wp_gpio);
+ ret = gpio_get_value(host->wp_gpio);
+
+ if (host->wp_inverted)
+ ret = !ret;
+
+ return ret;
}
static int mxs_mmc_get_cd(struct mmc_host *mmc)
@@ -786,6 +793,8 @@ static int mxs_mmc_probe(struct platform_device *pdev)
else if (bus_width == 8)
mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA;
host->wp_gpio = of_get_named_gpio(np, "wp-gpios", 0);
+ if (of_find_property(np, "wp-inverted", NULL))
+ host->wp_inverted = 1;
} else {
if (pdata->flags & SLOTF_8_BIT_CAPABLE)
mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA;
--
1.7.10
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] mmc: mxs-mmc: Add wp-inverted property
2012-05-21 3:36 Marek Vasut
@ 2012-05-21 3:45 ` Chris Ball
2012-05-21 3:49 ` Marek Vasut
0 siblings, 1 reply; 10+ messages in thread
From: Chris Ball @ 2012-05-21 3:45 UTC (permalink / raw)
To: Marek Vasut; +Cc: linux-arm-kernel, Shawn Guo, Fabio Estevam, linux-mmc
Hi Marek,
On Sun, May 20 2012, Marek Vasut wrote:
> The write-protect GPIO is inverted on some boards. Handle such case.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> Cc: linux-mmc@vger.kernel.org
> Cc: Chris Ball <cjb@laptop.org>
> ---
> Documentation/devicetree/bindings/mmc/mxs-mmc.txt | 1 +
> drivers/mmc/host/mxs-mmc.c | 11 ++++++++++-
> 2 files changed, 11 insertions(+), 1 deletion(-)
>
> V2: Adjust the subject, Cc linux-mmc
Thanks, looks good. Since this depends on patches that are going via
arm-soc, I'm going to wait until that's in Linus master before merging.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mmc: mxs-mmc: Add wp-inverted property
2012-05-21 3:45 ` Chris Ball
@ 2012-05-21 3:49 ` Marek Vasut
0 siblings, 0 replies; 10+ messages in thread
From: Marek Vasut @ 2012-05-21 3:49 UTC (permalink / raw)
To: Chris Ball; +Cc: linux-arm-kernel, Shawn Guo, Fabio Estevam, linux-mmc
Dear Chris Ball,
> Hi Marek,
>
> On Sun, May 20 2012, Marek Vasut wrote:
> > The write-protect GPIO is inverted on some boards. Handle such case.
> >
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Cc: Shawn Guo <shawn.guo@linaro.org>
> > Cc: Fabio Estevam <fabio.estevam@freescale.com>
> > Cc: linux-mmc@vger.kernel.org
> > Cc: Chris Ball <cjb@laptop.org>
> > ---
> >
> > Documentation/devicetree/bindings/mmc/mxs-mmc.txt | 1 +
> > drivers/mmc/host/mxs-mmc.c | 11 ++++++++++-
> > 2 files changed, 11 insertions(+), 1 deletion(-)
> >
> > V2: Adjust the subject, Cc linux-mmc
>
> Thanks, looks good. Since this depends on patches that are going via
> arm-soc, I'm going to wait until that's in Linus master before merging.
Roger that, thanks!
>
> - Chris.
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] mmc: mxs-mmc: Add wp-inverted property
@ 2012-05-21 21:01 Marek Vasut
2012-05-21 21:17 ` Guennadi Liakhovetski
0 siblings, 1 reply; 10+ messages in thread
From: Marek Vasut @ 2012-05-21 21:01 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Marek Vasut, Shawn Guo, Fabio Estevam, linux-mmc, Chris Ball,
Lothar Waßmann
The write-protect GPIO is inverted on some boards. Handle such case.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: linux-mmc@vger.kernel.org
Cc: Chris Ball <cjb@laptop.org>
Cc: Lothar Waßmann <LW@karo-electronics.de>
---
drivers/mmc/host/mxs-mmc.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index 277161d..9bfd08e 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -164,16 +164,23 @@ struct mxs_mmc_host {
spinlock_t lock;
int sdio_irq_en;
int wp_gpio;
+ int wp_inverted:1;
};
static int mxs_mmc_get_ro(struct mmc_host *mmc)
{
struct mxs_mmc_host *host = mmc_priv(mmc);
+ int ret;
if (!gpio_is_valid(host->wp_gpio))
return -EINVAL;
- return gpio_get_value(host->wp_gpio);
+ ret = gpio_get_value(host->wp_gpio);
+
+ if (host->wp_inverted)
+ ret = !ret;
+
+ return ret;
}
static int mxs_mmc_get_cd(struct mmc_host *mmc)
@@ -707,6 +714,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
struct pinctrl *pinctrl;
int ret = 0, irq_err, irq_dma;
dma_cap_mask_t mask;
+ enum of_gpio_flags flags;
iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0);
@@ -785,7 +793,10 @@ static int mxs_mmc_probe(struct platform_device *pdev)
mmc->caps |= MMC_CAP_4_BIT_DATA;
else if (bus_width == 8)
mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA;
- host->wp_gpio = of_get_named_gpio(np, "wp-gpios", 0);
+ host->wp_gpio = of_get_named_gpio_flags(np, "wp-gpios", 0,
+ &flags);
+ if (flags & OF_GPIO_ACTIVE_LOW)
+ host->wp_inverted = 1;
} else {
if (pdata->flags & SLOTF_8_BIT_CAPABLE)
mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA;
--
1.7.10
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] mmc: mxs-mmc: Add wp-inverted property
2012-05-21 21:01 [PATCH] mmc: mxs-mmc: Add wp-inverted property Marek Vasut
@ 2012-05-21 21:17 ` Guennadi Liakhovetski
0 siblings, 0 replies; 10+ messages in thread
From: Guennadi Liakhovetski @ 2012-05-21 21:17 UTC (permalink / raw)
To: Marek Vasut
Cc: linux-arm-kernel, Shawn Guo, Fabio Estevam, linux-mmc, Chris Ball,
Lothar Waßmann
On Mon, 21 May 2012, Marek Vasut wrote:
> The write-protect GPIO is inverted on some boards. Handle such case.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> Cc: linux-mmc@vger.kernel.org
> Cc: Chris Ball <cjb@laptop.org>
> Cc: Lothar Waßmann <LW@karo-electronics.de>
> ---
> drivers/mmc/host/mxs-mmc.c | 15 +++++++++++++--
> 1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
> index 277161d..9bfd08e 100644
> --- a/drivers/mmc/host/mxs-mmc.c
> +++ b/drivers/mmc/host/mxs-mmc.c
> @@ -164,16 +164,23 @@ struct mxs_mmc_host {
> spinlock_t lock;
> int sdio_irq_en;
> int wp_gpio;
> + int wp_inverted:1;
I think, many mmc drivers could use such a flag, so, I proposed this
http://www.mail-archive.com/linux-mmc@vger.kernel.org/msg14018.html
and I'm planning to respin that entire patch-series, taking reviews into
account. However, that specific patch doesn't depend on anything, so, it
can be taken directly. Then drivers would just use the new CAP2 flag,
instead of adding similar flags to their private data. Another advantage
of having that flag centrally is, that it will enable its use from the
slot function helper module
http://www.mail-archive.com/linux-mmc@vger.kernel.org/msg14031.html
which I'll also respin soon.
Thanks
Guennadi
> };
>
> static int mxs_mmc_get_ro(struct mmc_host *mmc)
> {
> struct mxs_mmc_host *host = mmc_priv(mmc);
> + int ret;
>
> if (!gpio_is_valid(host->wp_gpio))
> return -EINVAL;
>
> - return gpio_get_value(host->wp_gpio);
> + ret = gpio_get_value(host->wp_gpio);
> +
> + if (host->wp_inverted)
> + ret = !ret;
> +
> + return ret;
> }
>
> static int mxs_mmc_get_cd(struct mmc_host *mmc)
> @@ -707,6 +714,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
> struct pinctrl *pinctrl;
> int ret = 0, irq_err, irq_dma;
> dma_cap_mask_t mask;
> + enum of_gpio_flags flags;
>
> iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0);
> @@ -785,7 +793,10 @@ static int mxs_mmc_probe(struct platform_device *pdev)
> mmc->caps |= MMC_CAP_4_BIT_DATA;
> else if (bus_width == 8)
> mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA;
> - host->wp_gpio = of_get_named_gpio(np, "wp-gpios", 0);
> + host->wp_gpio = of_get_named_gpio_flags(np, "wp-gpios", 0,
> + &flags);
> + if (flags & OF_GPIO_ACTIVE_LOW)
> + host->wp_inverted = 1;
> } else {
> if (pdata->flags & SLOTF_8_BIT_CAPABLE)
> mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA;
> --
> 1.7.10
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] mmc: mxs-mmc: Add wp-inverted property
@ 2012-06-08 18:55 Marek Vasut
2012-07-19 11:50 ` Marek Vasut
2012-07-19 15:02 ` Chris Ball
0 siblings, 2 replies; 10+ messages in thread
From: Marek Vasut @ 2012-06-08 18:55 UTC (permalink / raw)
To: linux-mmc
Cc: Marek Vasut, Shawn Guo, Fabio Estevam, Chris Ball,
Lothar Waßmann
The write-protect GPIO is inverted on some boards. Handle such case.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: linux-mmc@vger.kernel.org
Cc: Chris Ball <cjb@laptop.org>
Cc: Lothar Waßmann <LW@karo-electronics.de>
---
drivers/mmc/host/mxs-mmc.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index 34a9026..c6964e1 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -164,16 +164,23 @@ struct mxs_mmc_host {
spinlock_t lock;
int sdio_irq_en;
int wp_gpio;
+ int wp_inverted:1;
};
static int mxs_mmc_get_ro(struct mmc_host *mmc)
{
struct mxs_mmc_host *host = mmc_priv(mmc);
+ int ret;
if (!gpio_is_valid(host->wp_gpio))
return -EINVAL;
- return gpio_get_value(host->wp_gpio);
+ ret = gpio_get_value(host->wp_gpio);
+
+ if (host->wp_inverted)
+ ret = !ret;
+
+ return ret;
}
static int mxs_mmc_get_cd(struct mmc_host *mmc)
@@ -707,6 +714,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
struct pinctrl *pinctrl;
int ret = 0, irq_err, irq_dma;
dma_cap_mask_t mask;
+ enum of_gpio_flags flags;
iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0);
@@ -785,7 +793,10 @@ static int mxs_mmc_probe(struct platform_device *pdev)
mmc->caps |= MMC_CAP_4_BIT_DATA;
else if (bus_width == 8)
mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA;
- host->wp_gpio = of_get_named_gpio(np, "wp-gpios", 0);
+ host->wp_gpio = of_get_named_gpio_flags(np, "wp-gpios", 0,
+ &flags);
+ if (flags & OF_GPIO_ACTIVE_LOW)
+ host->wp_inverted = 1;
} else {
if (pdata->flags & SLOTF_8_BIT_CAPABLE)
mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA;
--
1.7.10
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] mmc: mxs-mmc: Add wp-inverted property
2012-06-08 18:55 Marek Vasut
@ 2012-07-19 11:50 ` Marek Vasut
2012-07-19 15:02 ` Chris Ball
1 sibling, 0 replies; 10+ messages in thread
From: Marek Vasut @ 2012-07-19 11:50 UTC (permalink / raw)
To: linux-mmc; +Cc: Shawn Guo, Fabio Estevam, Chris Ball, Lothar Waßmann
Hi,
> The write-protect GPIO is inverted on some boards. Handle such case.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> Cc: linux-mmc@vger.kernel.org
> Cc: Chris Ball <cjb@laptop.org>
> Cc: Lothar Waßmann <LW@karo-electronics.de>
[...]
I don't see this in -next yet, was this applied please? Or maybe it is stuck in
some tree that wasn't pulled yet?
Thanks!
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mmc: mxs-mmc: Add wp-inverted property
2012-06-08 18:55 Marek Vasut
2012-07-19 11:50 ` Marek Vasut
@ 2012-07-19 15:02 ` Chris Ball
2012-07-19 15:06 ` Marek Vasut
1 sibling, 1 reply; 10+ messages in thread
From: Chris Ball @ 2012-07-19 15:02 UTC (permalink / raw)
To: Marek Vasut; +Cc: linux-mmc, Shawn Guo, Fabio Estevam, Lothar Waßmann
Hi Marek,
On Fri, Jun 08 2012, Marek Vasut wrote:
> The write-protect GPIO is inverted on some boards. Handle such case.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> Cc: linux-mmc@vger.kernel.org
> Cc: Chris Ball <cjb@laptop.org>
> Cc: Lothar Waßmann <LW@karo-electronics.de>
> ---
> drivers/mmc/host/mxs-mmc.c | 15 +++++++++++++--
> 1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
> index 34a9026..c6964e1 100644
> --- a/drivers/mmc/host/mxs-mmc.c
> +++ b/drivers/mmc/host/mxs-mmc.c
> @@ -164,16 +164,23 @@ struct mxs_mmc_host {
> spinlock_t lock;
> int sdio_irq_en;
> int wp_gpio;
> + int wp_inverted:1;
Mind if I change this to "bool wp_inverted;"? Other than that, looks
fine and I'll merge it for 3.6.
Thanks,
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mmc: mxs-mmc: Add wp-inverted property
2012-07-19 15:02 ` Chris Ball
@ 2012-07-19 15:06 ` Marek Vasut
2012-07-19 15:12 ` Chris Ball
0 siblings, 1 reply; 10+ messages in thread
From: Marek Vasut @ 2012-07-19 15:06 UTC (permalink / raw)
To: Chris Ball; +Cc: linux-mmc, Shawn Guo, Fabio Estevam, Lothar Waßmann
Dear Chris Ball,
> Hi Marek,
>
> On Fri, Jun 08 2012, Marek Vasut wrote:
> > The write-protect GPIO is inverted on some boards. Handle such case.
> >
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Cc: Shawn Guo <shawn.guo@linaro.org>
> > Cc: Fabio Estevam <fabio.estevam@freescale.com>
> > Cc: linux-mmc@vger.kernel.org
> > Cc: Chris Ball <cjb@laptop.org>
> > Cc: Lothar Waßmann <LW@karo-electronics.de>
> > ---
> >
> > drivers/mmc/host/mxs-mmc.c | 15 +++++++++++++--
> > 1 file changed, 13 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
> > index 34a9026..c6964e1 100644
> > --- a/drivers/mmc/host/mxs-mmc.c
> > +++ b/drivers/mmc/host/mxs-mmc.c
> > @@ -164,16 +164,23 @@ struct mxs_mmc_host {
> >
> > spinlock_t lock;
> > int sdio_irq_en;
> > int wp_gpio;
> >
> > + int wp_inverted:1;
>
> Mind if I change this to "bool wp_inverted;"? Other than that, looks
> fine and I'll merge it for 3.6.
That should be fine. Thanks!
> Thanks,
>
> - Chris.
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mmc: mxs-mmc: Add wp-inverted property
2012-07-19 15:06 ` Marek Vasut
@ 2012-07-19 15:12 ` Chris Ball
0 siblings, 0 replies; 10+ messages in thread
From: Chris Ball @ 2012-07-19 15:12 UTC (permalink / raw)
To: Marek Vasut; +Cc: linux-mmc, Shawn Guo, Fabio Estevam, Lothar Waßmann
Hi,
On Thu, Jul 19 2012, Marek Vasut wrote:
>> > diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
>> > index 34a9026..c6964e1 100644
>> > --- a/drivers/mmc/host/mxs-mmc.c
>> > +++ b/drivers/mmc/host/mxs-mmc.c
>> > @@ -164,16 +164,23 @@ struct mxs_mmc_host {
>> >
>> > spinlock_t lock;
>> > int sdio_irq_en;
>> > int wp_gpio;
>> >
>> > + int wp_inverted:1;
>>
>> Mind if I change this to "bool wp_inverted;"? Other than that, looks
>> fine and I'll merge it for 3.6.
>
> That should be fine. Thanks!
Thanks, pushed to mmc-next for 3.6.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-07-19 15:12 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-21 21:01 [PATCH] mmc: mxs-mmc: Add wp-inverted property Marek Vasut
2012-05-21 21:17 ` Guennadi Liakhovetski
-- strict thread matches above, loose matches on Subject: below --
2012-06-08 18:55 Marek Vasut
2012-07-19 11:50 ` Marek Vasut
2012-07-19 15:02 ` Chris Ball
2012-07-19 15:06 ` Marek Vasut
2012-07-19 15:12 ` Chris Ball
2012-05-21 3:36 Marek Vasut
2012-05-21 3:45 ` Chris Ball
2012-05-21 3:49 ` Marek Vasut
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).