Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp172025imu; Wed, 12 Dec 2018 14:22:50 -0800 (PST) X-Google-Smtp-Source: AFSGD/UeEGjskm4dCzTPpGq99izk5WST1vynBuNombYXCDjEHg5621qJIZUbpRuxXXQQJepeTUJC X-Received: by 2002:a17:902:9691:: with SMTP id n17mr22058959plp.9.1544653370288; Wed, 12 Dec 2018 14:22:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544653370; cv=none; d=google.com; s=arc-20160816; b=buukO4MESaNu9QR+K+jOpVOCP3w+U4zC53s/ufXma2Y9ovxBJ8/mzkmdMwqHJozTt1 4DdZ3945gmXoyB+qgQ73QagLUroraC95DKbK0P869rinIMRT1WBt6HCn0WMkRhYSIqPa qZndezibsRFHBsj8DfoxUmMBQzz1gJsPKDm8AORG/vZ+JKHF6+7yK8vq+Ss0Fs5A/bmO MYdlHRNNGsGDd2uUjz17F86PRRvDUDOczedwep31g/NvPScS5I9rxkQktNh6kTub5qJI 1XQWQ9PMfhBx3baNeUnY/y5yccav1rMvvqr86Q0WnYVs6BB7iqjf6x3yVQeDy3D2xe7i eG8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:references:in-reply-to :message-id:date:subject:cc:to:from; bh=vEki8AbJpN9DSqDNqNB+fZRpFFZ+C9EZObeCbwuVDNo=; b=x49p15WZ2nnSGcM7FPvBvK94TpScpiRvjYGle24fLWDnsiDVnKburUikm538EvM5Y3 twM2ppp1sWUjtJQA5MdwpArUxkgZ7gBzHVX8oFbKBUJbw5fbX/oKCm9Vo6iRcNqhfUwS jniYmX3OyNtScB89uJ0dC3JsmTwJYM1a+UYudpdu6yQX2d2mE+V6tiViys0hfPNmjh/B R2NHOJS2INfozIeEkJOIrM7VuEYuyKjRAnF0qMDXdGFe+qvYpYOFgz3XN/f0n0NA5qdy SCxVP9SUAuCznyh9vuELqbE1Kulb26sdWxfjdzT+r7fR4+BZ5WiB/8KIrB3f2MDUHhBx PgSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=L0ZiOaaN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i23si23403pgb.116.2018.12.12.14.22.35; Wed, 12 Dec 2018 14:22:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=L0ZiOaaN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728567AbeLLWVu (ORCPT + 99 others); Wed, 12 Dec 2018 17:21:50 -0500 Received: from outils.crapouillou.net ([89.234.176.41]:44938 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726294AbeLLWVm (ORCPT ); Wed, 12 Dec 2018 17:21:42 -0500 From: Paul Cercueil To: Thierry Reding , Rob Herring , Mark Rutland , Daniel Lezcano , Thomas Gleixner , Ralf Baechle , Paul Burton , James Hogan , Jonathan Corbet Cc: Mathieu Malaterre , Ezequiel Garcia , PrasannaKumar Muralidharan , linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-mips@vger.kernel.org, linux-doc@vger.kernel.org, linux-clk@vger.kernel.org, od@zcrc.me, Paul Cercueil Subject: [PATCH v8 19/26] MIPS: qi_lb60: Move PWM devices to devicetree Date: Wed, 12 Dec 2018 23:09:14 +0100 Message-Id: <20181212220922.18759-20-paul@crapouillou.net> In-Reply-To: <20181212220922.18759-1-paul@crapouillou.net> References: <20181212220922.18759-1-paul@crapouillou.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1544652608; bh=vEki8AbJpN9DSqDNqNB+fZRpFFZ+C9EZObeCbwuVDNo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=L0ZiOaaN8iPzjZdOC7iPvkmTAuCds21GWptausnd2k//OpHY5ZGHx8hfnp64qjZT4grvApTwNdoCaVL22YzTIghAMGuWdxTl9HzTY/UNxm0th6KsmFB/M0DcNiD5raXoaG5NRUVidYRiOISLWZyuPW/M3XxeqgzaTfcuTtSLt1Y= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Probe the few drivers using PWMs from devicetree, now that we have a devicetree node for the PWM driver. Signed-off-by: Paul Cercueil --- Notes: v5: New patch v6: No change v7: No change v8: No change arch/mips/boot/dts/ingenic/qi_lb60.dts | 14 ++++++++++++++ arch/mips/jz4740/board-qi_lb60.c | 19 ------------------- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/arch/mips/boot/dts/ingenic/qi_lb60.dts b/arch/mips/boot/dts/ingenic/qi_lb60.dts index 76aaf8982554..85529a142409 100644 --- a/arch/mips/boot/dts/ingenic/qi_lb60.dts +++ b/arch/mips/boot/dts/ingenic/qi_lb60.dts @@ -9,6 +9,14 @@ chosen { stdout-path = &uart0; }; + + beeper { + compatible = "pwm-beeper"; + pwms = <&pwm 4 0 0>; + + pinctrl-names = "default"; + pinctrl-0 = <&pins_pwm4>; + }; }; &ext { @@ -30,4 +38,10 @@ groups = "uart0-data"; bias-disable; }; + + pins_pwm4: pwm4 { + function = "pwm4"; + groups = "pwm4"; + bias-disable; + }; }; diff --git a/arch/mips/jz4740/board-qi_lb60.c b/arch/mips/jz4740/board-qi_lb60.c index af0c8ace0141..cc556be656d6 100644 --- a/arch/mips/jz4740/board-qi_lb60.c +++ b/arch/mips/jz4740/board-qi_lb60.c @@ -27,7 +27,6 @@ #include #include #include -#include #include @@ -392,17 +391,6 @@ static struct jz4740_mmc_platform_data qi_lb60_mmc_pdata = { .power_active_low = 1, }; -/* beeper */ -static struct pwm_lookup qi_lb60_pwm_lookup[] = { - PWM_LOOKUP("jz4740-pwm", 4, "pwm-beeper", NULL, 0, - PWM_POLARITY_NORMAL), -}; - -static struct platform_device qi_lb60_pwm_beeper = { - .name = "pwm-beeper", - .id = -1, -}; - /* charger */ static char *qi_lb60_batteries[] = { "battery", @@ -451,10 +439,8 @@ static struct platform_device *jz_platform_devices[] __initdata = { &jz4740_i2s_device, &jz4740_codec_device, &jz4740_adc_device, - &jz4740_pwm_device, &jz4740_dma_device, &qi_lb60_gpio_keys, - &qi_lb60_pwm_beeper, &qi_lb60_charger_device, &qi_lb60_audio_device, }; @@ -483,10 +469,6 @@ static struct pinctrl_map pin_map[] __initdata = { "10010000.jz4740-pinctrl", "PD0", pin_cfg_bias_disable), PIN_MAP_CONFIGS_PIN_DEFAULT("jz4740-mmc.0", "10010000.jz4740-pinctrl", "PD2", pin_cfg_bias_disable), - - /* PWM pin configuration */ - PIN_MAP_MUX_GROUP_DEFAULT("jz4740-pwm", - "10010000.jz4740-pinctrl", "pwm4", "pwm4"), }; @@ -504,7 +486,6 @@ static int __init qi_lb60_init_platform_devices(void) spi_register_board_info(qi_lb60_spi_board_info, ARRAY_SIZE(qi_lb60_spi_board_info)); - pwm_add_table(qi_lb60_pwm_lookup, ARRAY_SIZE(qi_lb60_pwm_lookup)); pinctrl_register_mappings(pin_map, ARRAY_SIZE(pin_map)); return platform_add_devices(jz_platform_devices, -- 2.11.0