mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Enrico Weigelt, metux IT consult" <lkml@metux.net>
To: Florian Eckert <fe@dev.tdt.de>,
	Eckert.Florian@googlemail.com, info@metux.net,
	dvhart@infradead.org, andy@infradead.org
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] platform/x86/pcengines-apuv2: add mpcie reset gpio export
Date: Mon, 22 Jul 2019 13:25:23 +0200	[thread overview]
Message-ID: <ca916de8-dab3-66d7-806b-b43a2df6cffb@metux.net> (raw)
In-Reply-To: <20190704090205.19400-2-fe@dev.tdt.de>

On 04.07.19 11:02, Florian Eckert wrote:
> On APUx we have also mpcie2/mpcie3 reset pins. To make it possible to reset
> the ports from the userspace, add the definition to this platform
> device. The gpio can then be exported by the legancy gpio subsystem to
> toggle the mpcie reset pin.
> 
> Signed-off-by: Florian Eckert <fe@dev.tdt.de>
> ---
>   drivers/platform/x86/pcengines-apuv2.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/platform/x86/pcengines-apuv2.c b/drivers/platform/x86/pcengines-apuv2.c
> index c1ca931e1fab..f6d8ed100cab 100644
> --- a/drivers/platform/x86/pcengines-apuv2.c
> +++ b/drivers/platform/x86/pcengines-apuv2.c
> @@ -32,6 +32,8 @@
>   #define APU2_GPIO_REG_LED3		AMD_FCH_GPIO_REG_GPIO59_DEVSLP1
>   #define APU2_GPIO_REG_MODESW		AMD_FCH_GPIO_REG_GPIO32_GE1
>   #define APU2_GPIO_REG_SIMSWAP		AMD_FCH_GPIO_REG_GPIO33_GE2
> +#define APU2_GPIO_REG_MPCIE2		AMD_FCH_GPIO_REG_GPIO59_DEVSLP0
> +#define APU2_GPIO_REG_MPCIE3		AMD_FCH_GPIO_REG_GPIO51
>   
>   /* order in which the gpio lines are defined in the register list */
>   #define APU2_GPIO_LINE_LED1		0
> @@ -39,6 +41,8 @@
>   #define APU2_GPIO_LINE_LED3		2
>   #define APU2_GPIO_LINE_MODESW		3
>   #define APU2_GPIO_LINE_SIMSWAP		4
> +#define APU2_GPIO_LINE_MPCIE2		5
> +#define APU2_GPIO_LINE_MPCIE3		6
>   
>   /* gpio device */
>   
> @@ -48,6 +52,8 @@ static int apu2_gpio_regs[] = {
>   	[APU2_GPIO_LINE_LED3]		= APU2_GPIO_REG_LED3,
>   	[APU2_GPIO_LINE_MODESW]		= APU2_GPIO_REG_MODESW,
>   	[APU2_GPIO_LINE_SIMSWAP]	= APU2_GPIO_REG_SIMSWAP,
> +	[APU2_GPIO_LINE_MPCIE2]		= APU2_GPIO_REG_MPCIE2,
> +	[APU2_GPIO_LINE_MPCIE3]		= APU2_GPIO_REG_MPCIE3,
>   };
>   
>   static const char * const apu2_gpio_names[] = {
> @@ -56,6 +62,8 @@ static const char * const apu2_gpio_names[] = {
>   	[APU2_GPIO_LINE_LED3]		= "front-led3",
>   	[APU2_GPIO_LINE_MODESW]		= "front-button",
>   	[APU2_GPIO_LINE_SIMSWAP]	= "simswap",
> +	[APU2_GPIO_LINE_MPCIE2]		= "mpcie2_reset",
> +	[APU2_GPIO_LINE_MPCIE3]		= "mpcie3_reset",
>   };
>   
>   static const struct amd_fch_gpio_pdata board_apu2 = {
> 

Acked-by: Enrico Weigelt <info@metux.net>

But note that these gpio's later will be bound to an appropriate
driver. I've got a patch in the queue that uses LED subsystem, but
haven't sorted out whether it's better to go via reset subsystem
(and add a gpio-based reset driver first).

--mtx

-- 
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

  parent reply	other threads:[~2019-07-22 11:25 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-04  9:02 [PATCH 0/3] Update pcengines-apuv2 platform device Florian Eckert
2019-07-04  9:02 ` [PATCH 1/3] platform/x86/pcengines-apuv2: add mpcie reset gpio export Florian Eckert
2019-07-08 19:44   ` Enrico Weigelt, metux IT consult
2019-07-10 12:30     ` Florian Eckert
2019-07-15 12:15   ` Enrico Weigelt, metux IT consult
2019-07-15 14:38     ` Florian Eckert
2019-07-16 18:23       ` Enrico Weigelt, metux IT consult
2019-07-22 11:25   ` Enrico Weigelt, metux IT consult [this message]
2019-07-04  9:02 ` [PATCH 2/3] platform/x86/pcengines-apuv2: add legacy leds gpio definitions Florian Eckert
2019-07-08 19:42   ` Enrico Weigelt, metux IT consult
2019-07-10 12:03     ` Florian Eckert
2019-07-10 13:07       ` Enrico Weigelt, metux IT consult
2019-07-04  9:02 ` [PATCH 3/3] platform//x86/pcengines-apuv2: update gpio button definition Florian Eckert
2019-07-08 19:27   ` Enrico Weigelt, metux IT consult
2019-07-22 11:27   ` Enrico Weigelt, metux IT consult
2019-07-23  7:06     ` Florian Eckert
2019-07-23 23:00       ` Enrico Weigelt, metux IT consult
2019-07-04 13:39 ` [PATCH 0/3] Update pcengines-apuv2 platform device Andy Shevchenko
2019-07-04 14:00   ` Florian Eckert
2019-07-04 14:26     ` Andy Shevchenko
2019-07-05 11:36       ` Florian Eckert
2019-07-08 19:39         ` Enrico Weigelt, metux IT consult
2019-07-08 19:45   ` Enrico Weigelt, metux IT consult
2019-07-10 12:54     ` Florian Eckert
2019-07-25 17:49       ` Andy Shevchenko
2019-07-25 19:12         ` Enrico Weigelt, metux IT consult

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=ca916de8-dab3-66d7-806b-b43a2df6cffb@metux.net \
    --to=lkml@metux.net \
    --cc=Eckert.Florian@googlemail.com \
    --cc=andy@infradead.org \
    --cc=dvhart@infradead.org \
    --cc=fe@dev.tdt.de \
    --cc=info@metux.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®