From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 169EEC10F0E for ; Mon, 15 Apr 2019 19:42:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D32EC20675 for ; Mon, 15 Apr 2019 19:42:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="s8kMKZX6"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hFENGm2W" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D32EC20675 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ngeWYBbXp/iHUGSOiywEQOOrcZ+Q/ui0rFSEs5R4GnU=; b=s8kMKZX6U8fufw juPhrCigNiuR/o6VRUpMJX1yzICflqOCInsQ5FNMg7rfhSqMllswyoSITy5UKTJyA3ox9TdpqNscC GQvQSZN8k/N5DHflPIyqTznnPebzAtPp+e1iaurJAQgDlO8d/xsScfAB5ADdqQAJmD9nkARHZDdm0 eQK8kGI4jwp6MtOaLzKGxiCJQYGVyuv9hSuhBDGAwieGgkyiogkRN8cI+ALumPrGB6ZY2gHgWGU/s yGcU32YPvk41YpH02UdLjqsE/m3l2Oi/ggUaP0k1D4DS1ALWHWzEtgoIveWQdGOIqyK0XSNu+ctu+ 8EF4ZIkt1DzFc10PZ90g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hG7Uz-0000F7-CV; Mon, 15 Apr 2019 19:42:37 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hG7Uw-0000El-2v for linux-arm-kernel@lists.infradead.org; Mon, 15 Apr 2019 19:42:35 +0000 Received: by mail-wm1-x344.google.com with SMTP id z24so22089831wmi.5 for ; Mon, 15 Apr 2019 12:42:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=VRxhfJBnMDDd1DJCvvW3loKAywUsqxyCFaAOHyOtjBc=; b=hFENGm2W4WFmK9c3AxDKZ+xJU+sQeCKq7i5kwynEFC+8DgNOW7YGbDOopbBPv3SzyV VF61MKmRu2anFmEew10kzaUOiH/3gVNGWFXT1/GJbOyiYTMN6lS0S/gcxxG3ZpXYo0WM bgi0/v5kTOkcT3aZQSUhc0uDKF2eDF3JGV0+k4huQ3KPOSCLp3faSrInVC1z9sjMmxb3 YnusYzX3f4s3SBkjFnZJ9T85ztVrfYXzGUgdjR36LB4ZB+jJH/jvptJFtBwvA4Mfzqw6 96LvY+hu9SxHNgFhlbN3/U/RMKphy4eItJAYPFUHC6wgHIvj9h61nbOaENE9dd0zfhHY Tddw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=VRxhfJBnMDDd1DJCvvW3loKAywUsqxyCFaAOHyOtjBc=; b=llzuS+IxKa8SA6UfrDzRJMgwsLzrAWzlqiYpb3NYnLFI/RwPtyrivCOASpnYkKwana AYe2Prc2dzj8N4775c7cjFYeQ6Ci2QpeNCrnvfBRPLSnYbA/kc9vE7ODoeSX0JNRav5O eUhGxb3imRKEF0lEsO8LubgDp8VY5IDeYA4S/FP4OxjKf9WayTSFw9mjuCw9sCVW2ubz LhjybHkQfVdxcdZvRmiSeqZAgMmfsgge7ucIkbbEB/VEzFcJ+bzmMbxe9a8g7AoFJ9rG BmE4YheHbhqkjv/Ab+I+HeflTfzbFSG4IN5C8G1SVRaDdpAQe4FIPfWIVS6e9jmtthS7 5VEw== X-Gm-Message-State: APjAAAVxN4P802+YwmqckXcu6ry+BZK8RiDtCygpZqF1JjtjgNtxapRe Ddpdb2Yv75blSce74Gn8k/w= X-Google-Smtp-Source: APXvYqyOQfUaKzftVc0KY4jFZyUXIF0o1bg1nyDdiBwyqtIiKd/aFHa8Qdx9agT5G6nzlPFg5b32Hg== X-Received: by 2002:a7b:c4d5:: with SMTP id g21mr22753891wmk.133.1555357352176; Mon, 15 Apr 2019 12:42:32 -0700 (PDT) Received: from [192.168.1.221] ([195.245.38.118]) by smtp.gmail.com with ESMTPSA id z140sm45680232wmc.27.2019.04.15.12.42.30 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 15 Apr 2019 12:42:31 -0700 (PDT) Subject: Re: [PATCH 3/4] ARM: ep93xx: move pinctrl interfaces into include/linux/soc To: Arnd Bergmann , Hartley Sweeten References: <20190415192734.935387-1-arnd@arndb.de> <20190415192734.935387-3-arnd@arndb.de> From: Alexander Sverdlin Message-ID: <1710526a-b988-24b3-307d-bd9d6e3f1769@gmail.com> Date: Mon, 15 Apr 2019 21:41:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190415192734.935387-3-arnd@arndb.de> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190415_124234_133725_BD2FFAC1 X-CRM114-Status: GOOD ( 21.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jens Axboe , linux-pwm@vger.kernel.org, alsa-devel@alsa-project.org, Bartlomiej Zolnierkiewicz , Linus Walleij , Dmitry Torokhov , linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, Thierry Reding , Mark Brown , linux-input@vger.kernel.org, Olof Johansson , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 15/04/2019 21:25, Arnd Bergmann wrote: > ep93xx does not have a proper pinctrl driver, but does things > ad-hoc through mach/platform.h, which is also used for setting > up the boards. > > To avoid using mach/*.h headers completely, let's move the interfaces > into include/linux/soc/. This is far from great, but gets the job > done here, without the need for a proper pinctrl driver. Acked-by: Alexander Sverdlin > Signed-off-by: Arnd Bergmann > --- > arch/arm/mach-ep93xx/clock.c | 1 + > arch/arm/mach-ep93xx/core.c | 2 ++ > arch/arm/mach-ep93xx/include/mach/platform.h | 16 --------- > drivers/ata/pata_ep93xx.c | 2 +- > drivers/input/keyboard/ep93xx_keypad.c | 3 +- > drivers/pwm/pwm-ep93xx.c | 2 +- > include/linux/soc/cirrus/ep93xx.h | 37 ++++++++++++++++++++ > sound/soc/cirrus/edb93xx.c | 2 +- > sound/soc/cirrus/ep93xx-ac97.c | 1 + > sound/soc/cirrus/ep93xx-i2s.c | 3 +- > sound/soc/cirrus/simone.c | 2 +- > sound/soc/cirrus/snappercl15.c | 2 +- > 12 files changed, 48 insertions(+), 25 deletions(-) > create mode 100644 include/linux/soc/cirrus/ep93xx.h > > diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c > index d2eee707d27f..9f43362eb62d 100644 > --- a/arch/arm/mach-ep93xx/clock.c > +++ b/arch/arm/mach-ep93xx/clock.c > @@ -20,6 +20,7 @@ > #include > #include > #include > +#include > > #include > > diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c > index 706515faee06..3d245668846d 100644 > --- a/arch/arm/mach-ep93xx/core.c > +++ b/arch/arm/mach-ep93xx/core.c > @@ -43,6 +43,8 @@ > #include > #include > #include > +#include > + > #include > > #include > diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h > index 43446f33c2be..b4045a186239 100644 > --- a/arch/arm/mach-ep93xx/include/mach/platform.h > +++ b/arch/arm/mach-ep93xx/include/mach/platform.h > @@ -19,14 +19,6 @@ struct ep93xx_spi_info; > void ep93xx_map_io(void); > void ep93xx_init_irq(void); > > -#define EP93XX_CHIP_REV_D0 3 > -#define EP93XX_CHIP_REV_D1 4 > -#define EP93XX_CHIP_REV_E0 5 > -#define EP93XX_CHIP_REV_E1 6 > -#define EP93XX_CHIP_REV_E2 7 > - > -unsigned int ep93xx_chip_revision(void); > - > void ep93xx_register_flash(unsigned int width, > resource_size_t start, resource_size_t size); > > @@ -36,19 +28,11 @@ void ep93xx_register_spi(struct ep93xx_spi_info *info, > struct spi_board_info *devices, int num); > void ep93xx_register_fb(struct ep93xxfb_mach_info *data); > void ep93xx_register_pwm(int pwm0, int pwm1); > -int ep93xx_pwm_acquire_gpio(struct platform_device *pdev); > -void ep93xx_pwm_release_gpio(struct platform_device *pdev); > void ep93xx_register_keypad(struct ep93xx_keypad_platform_data *data); > -int ep93xx_keypad_acquire_gpio(struct platform_device *pdev); > -void ep93xx_keypad_release_gpio(struct platform_device *pdev); > void ep93xx_register_i2s(void); > -int ep93xx_i2s_acquire(void); > -void ep93xx_i2s_release(void); > void ep93xx_register_ac97(void); > void ep93xx_register_ide(void); > void ep93xx_register_adc(void); > -int ep93xx_ide_acquire_gpio(struct platform_device *pdev); > -void ep93xx_ide_release_gpio(struct platform_device *pdev); > > struct device *ep93xx_init_devices(void); > extern void ep93xx_timer_init(void); > diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c > index cc6d06c1b2c7..db271b705529 100644 > --- a/drivers/ata/pata_ep93xx.c > +++ b/drivers/ata/pata_ep93xx.c > @@ -44,7 +44,7 @@ > #include > > #include > -#include > +#include > > #define DRV_NAME "ep93xx-ide" > #define DRV_VERSION "1.0" > diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c > index 71472f6257c0..575dac52f7b4 100644 > --- a/drivers/input/keyboard/ep93xx_keypad.c > +++ b/drivers/input/keyboard/ep93xx_keypad.c > @@ -27,8 +27,7 @@ > #include > #include > #include > - > -#include > +#include > #include > > /* > diff --git a/drivers/pwm/pwm-ep93xx.c b/drivers/pwm/pwm-ep93xx.c > index bbf10ae02f0e..fa168581e6b8 100644 > --- a/drivers/pwm/pwm-ep93xx.c > +++ b/drivers/pwm/pwm-ep93xx.c > @@ -35,7 +35,7 @@ > > #include > > -#include /* for ep93xx_pwm_{acquire,release}_gpio() */ > +#include /* for ep93xx_pwm_{acquire,release}_gpio() */ > > #define EP93XX_PWMx_TERM_COUNT 0x00 > #define EP93XX_PWMx_DUTY_CYCLE 0x04 > diff --git a/include/linux/soc/cirrus/ep93xx.h b/include/linux/soc/cirrus/ep93xx.h > new file mode 100644 > index 000000000000..56fbe2dc59b1 > --- /dev/null > +++ b/include/linux/soc/cirrus/ep93xx.h > @@ -0,0 +1,37 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _SOC_EP93XX_H > +#define _SOC_EP93XX_H > + > +struct platform_device; > + > +#define EP93XX_CHIP_REV_D0 3 > +#define EP93XX_CHIP_REV_D1 4 > +#define EP93XX_CHIP_REV_E0 5 > +#define EP93XX_CHIP_REV_E1 6 > +#define EP93XX_CHIP_REV_E2 7 > + > +#ifdef CONFIG_ARCH_EP93XX > +int ep93xx_pwm_acquire_gpio(struct platform_device *pdev); > +void ep93xx_pwm_release_gpio(struct platform_device *pdev); > +int ep93xx_ide_acquire_gpio(struct platform_device *pdev); > +void ep93xx_ide_release_gpio(struct platform_device *pdev); > +int ep93xx_keypad_acquire_gpio(struct platform_device *pdev); > +void ep93xx_keypad_release_gpio(struct platform_device *pdev); > +int ep93xx_i2s_acquire(void); > +void ep93xx_i2s_release(void); > +unsigned int ep93xx_chip_revision(void); > + > +#else > +static inline int ep93xx_pwm_acquire_gpio(struct platform_device *pdev) { return 0; } > +static inline void ep93xx_pwm_release_gpio(struct platform_device *pdev) {} > +static inline int ep93xx_ide_acquire_gpio(struct platform_device *pdev) { return 0; } > +static inline void ep93xx_ide_release_gpio(struct platform_device *pdev) {} > +static inline int ep93xx_keypad_acquire_gpio(struct platform_device *pdev) { return 0; } > +static inline void ep93xx_keypad_release_gpio(struct platform_device *pdev) {} > +static inline int ep93xx_i2s_acquire(void) { return 0; } > +static inline void ep93xx_i2s_release(void) {} > +static inline unsigned int ep93xx_chip_revision(void) { return 0; } > + > +#endif > + > +#endif > diff --git a/sound/soc/cirrus/edb93xx.c b/sound/soc/cirrus/edb93xx.c > index 3d011abaa266..f678b4c1514a 100644 > --- a/sound/soc/cirrus/edb93xx.c > +++ b/sound/soc/cirrus/edb93xx.c > @@ -22,11 +22,11 @@ > #include > #include > #include > +#include > #include > #include > #include > #include > -#include > > static int edb93xx_hw_params(struct snd_pcm_substream *substream, > struct snd_pcm_hw_params *params) > diff --git a/sound/soc/cirrus/ep93xx-ac97.c b/sound/soc/cirrus/ep93xx-ac97.c > index cd5a939ad608..c6bc447429af 100644 > --- a/sound/soc/cirrus/ep93xx-ac97.c > +++ b/sound/soc/cirrus/ep93xx-ac97.c > @@ -24,6 +24,7 @@ > #include > > #include > +#include > > #include "ep93xx-pcm.h" > > diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c > index 0918c5da575a..beab7c516855 100644 > --- a/sound/soc/cirrus/ep93xx-i2s.c > +++ b/sound/soc/cirrus/ep93xx-i2s.c > @@ -27,9 +27,8 @@ > #include > #include > > -#include > -#include > #include > +#include > > #include "ep93xx-pcm.h" > > diff --git a/sound/soc/cirrus/simone.c b/sound/soc/cirrus/simone.c > index 1ec661834e5a..cb850530331b 100644 > --- a/sound/soc/cirrus/simone.c > +++ b/sound/soc/cirrus/simone.c > @@ -13,13 +13,13 @@ > #include > #include > #include > +#include > > #include > #include > #include > > #include > -#include > > static struct snd_soc_dai_link simone_dai = { > .name = "AC97", > diff --git a/sound/soc/cirrus/snappercl15.c b/sound/soc/cirrus/snappercl15.c > index 11ff7b2672b2..dea4909154c8 100644 > --- a/sound/soc/cirrus/snappercl15.c > +++ b/sound/soc/cirrus/snappercl15.c > @@ -13,12 +13,12 @@ > > #include > #include > +#include > #include > #include > #include > > #include > -#include > > #include "../codecs/tlv320aic23.h" > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel