Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2528865imm; Thu, 9 Aug 2018 14:46:39 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwO8oBo3HVNoXDYK4a+TRu10sJz2tiE9ypBRA6wsPpVKaKuZdAEhMgKaV2JjEUJ2lwSbNYk X-Received: by 2002:a63:b605:: with SMTP id j5-v6mr3738905pgf.437.1533851199412; Thu, 09 Aug 2018 14:46:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533851199; cv=none; d=google.com; s=arc-20160816; b=nXR1sqOHbp7EFJA0NfSrMJ07LeakDFaIayHApoyeTeeYv35ivaveHZQgXsatGH9Rjc RfT/BhWgnRVicAjruLf6096elupeHB6QyRCLcBC/2iI18DCUW207n//Qfcv5td4vBBDb ZhHrDS8lSodkCsXcX2JM9TNtvkHtaWNjaOsP66FmIrPCOxXMPHC2K6rFxbejlpkrwhRY 5XR4TyaKBtMxxst44RM91S5+I+Xc+jdeNX6CvAytUmRX9rW37QhxA8tlCX9BAnmKNicc cEMQOLG9hXFaeeCgIAc2Vyf7un1jrHMt6g9diQeXlClmkfMA3hCUo3R9wzibBYP+sCin rgtA== 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:arc-authentication-results; bh=ud0udkoc/ygzPwD7ng+ltjpXM+BoA0DildI1rhzVmqw=; b=krl7RpByZtWaM0ltr+ftullRi6Nrj5sULX9Ep0I8PySZlCdPBD0P8sdRjVM22Fm+Gr 22KZS3MHUA+y4irr5Y0/SaWUhJPUHEdD7qQy6QbxkZkh2KgSNiGY3eVEWGdtkSZ+pMwM vhrRHM/HRQ3XqpzuriDEf7Bev7CHQvOSXAGZq8BKNTC9DlB2O2fhsQIXn0mBJX0a1EQo 6VkSusBFUJdxm8TBbxsxQRP6Pch2PqxypiY1R2JrERafMdATbTTZH8xhMxUm8QxtknSp WvW9tgxDu1DH+iIqxJn/UaBCURfbpfxj5v6Y9Zni2iVbIOSXpZJgM6gbwJ4wPSSsKp5b ZNvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=fcV7veFy; 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 k4-v6si6002719pll.456.2018.08.09.14.46.25; Thu, 09 Aug 2018 14:46:39 -0700 (PDT) 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=fcV7veFy; 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 S1728097AbeHJAMP (ORCPT + 99 others); Thu, 9 Aug 2018 20:12:15 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:38784 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728028AbeHJAMO (ORCPT ); Thu, 9 Aug 2018 20:12:14 -0400 From: Paul Cercueil To: Rob Herring , Mark Rutland , Thierry Reding , Daniel Lezcano , Thomas Gleixner , Wim Van Sebroeck , Guenter Roeck , Ralf Baechle , Paul Burton , James Hogan , Jonathan Corbet , Lee Jones , Mathieu Malaterre , Ezequiel Garcia Cc: linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-mips@linux-mips.org, linux-doc@vger.kernel.org, linux-clk@vger.kernel.org, Paul Cercueil Subject: [PATCH v6 20/24] MIPS: qi_lb60: Move PWM devices to devicetree Date: Thu, 9 Aug 2018 23:44:10 +0200 Message-Id: <20180809214414.20905-21-paul@crapouillou.net> In-Reply-To: <20180809214414.20905-1-paul@crapouillou.net> References: <20180809214414.20905-1-paul@crapouillou.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1533851126; bh=ud0udkoc/ygzPwD7ng+ltjpXM+BoA0DildI1rhzVmqw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=fcV7veFy5jfeQ08cmUDv66XzaGaGIcv22S8vBxr3aToBXJUYmFaxelz6fl3jEnF7kDJyphYoyVebrT/t/vzfGrqu3twr2dyPL4v13s8zcfeWRosc6sh3lR1VmxWbiS2cCfyatUpEC64PmMtSkiaKmQsZGRcmh0RQlKkw8doHR5k= 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 --- arch/mips/boot/dts/ingenic/qi_lb60.dts | 14 ++++++++++++++ arch/mips/jz4740/board-qi_lb60.c | 19 ------------------- 2 files changed, 14 insertions(+), 19 deletions(-) v5: New patch v6: No change 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 60f0767507c6..2db32cb9ed47 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 #include @@ -391,17 +390,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", @@ -450,10 +438,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, }; @@ -482,10 +468,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"), }; @@ -503,7 +485,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