Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp754263pxk; Thu, 17 Sep 2020 15:37:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysCrebaNc6BtkQmvD2Jqwibl0YaBMhb+wNytuTVplWPfz2o9kV/AFRwgyRk2RSsThaZsBN X-Received: by 2002:a17:906:a444:: with SMTP id cb4mr32192721ejb.432.1600382254569; Thu, 17 Sep 2020 15:37:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600382254; cv=none; d=google.com; s=arc-20160816; b=JlBpaLtcGYOeXfVWkq03XBmsVDjEJHFJ28hlaRNMvlF7m3JkumAFbYFpiyBKqNTHsM 9yL3DoGHgJJUcYccI6ayOqygdpqt7MbjEXwbXj5UZMSuvJDngL3CPiAlEj/G/i4pWrmW CFW1Nc3mLkSJzn3HwB8+/0I0mQ1jDQvzSQu/0Ddkc472PgHCM2D3Cph4NvJJiK5VGjNI +o5Np42YyJDQHtJ+tAfwyuVfYZXaiSy742UOX0UsHF80yzYoDu/GhI9yi+CAF6a+KlSc a2Xmbym7rWeMYit1xmeaE174S8Q0nC39OH3/UXC3DcvfAzrjBoxx7enQ1Aa+kbrUoFXV T+HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DYYgakfAlQBUmoHY6d4E07mrEKHBn3TUGxCFUV1jeys=; b=jRMQJufYVBlssvVa8kzktbukA0il7qdJyBLRilguC3S5oWUGKVmeBBOwTgmiCqaGMw V3vnYqCqqRhGKfFtbb1ISoqSELNjE+n30mJUQQKRYw6b9DGmmIcdbfnosDCowKea8GIV jyycJJTQiSAbOo3/srZ3royvcvus2YSeDx/zPMCWMM8JaPlFzxtd1NKqwmHDc7OQ/wsY oyURS/PHh4bHqOgiTWwMDirGGNPV4Kw/1xqkYnRhKDiN1ORfWIfH+GNjpRbxdhZk6kiW LiFcg4poyANpO4w2UhtnE8u7TrT0E2BNzR2oEFWVhVraqvE2UQUs1o7Tsj4yEp8zj3Cp Yn5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nic.cz header.s=default header.b="czD/G+gh"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nic.cz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn20si1065730ejc.196.2020.09.17.15.37.11; Thu, 17 Sep 2020 15:37:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nic.cz header.s=default header.b="czD/G+gh"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nic.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726718AbgIQWff (ORCPT + 99 others); Thu, 17 Sep 2020 18:35:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726299AbgIQWeM (ORCPT ); Thu, 17 Sep 2020 18:34:12 -0400 Received: from mail.nic.cz (lists.nic.cz [IPv6:2001:1488:800:400::400]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA6FFC06174A; Thu, 17 Sep 2020 15:34:02 -0700 (PDT) Received: from dellmb.labs.office.nic.cz (unknown [IPv6:2001:1488:fffe:6:cac7:3539:7f1f:463]) by mail.nic.cz (Postfix) with ESMTP id 9B397142056; Fri, 18 Sep 2020 00:33:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1600382039; bh=LQAKDx0kVA7SocOtXLCSbyuMWmlZJ0E/+Mbf5ZWeZ6A=; h=From:To:Date; b=czD/G+ghQUntUJou8dAIiozCvmmm6cxDH6NHBFTGhZwsqQ3OTJHuTWMhw9c6kG+8Z XReDwu6v4rqng9/klbj9rrKEaqlV6HFXI/O9BO9dnrFbH5i31efxjEdAC6NjLWG3iC +Uv+0yz3FOlirYZZdYUguFn5APKQk3o5/dcWCRuY= From: =?UTF-8?q?Marek=20Beh=C3=BAn?= To: linux-leds@vger.kernel.org Cc: Pavel Machek , Dan Murphy , =?UTF-8?q?Ond=C5=99ej=20Jirman?= , linux-kernel@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, =?UTF-8?q?Marek=20Beh=C3=BAn?= Subject: [PATCH leds v2 35/50] leds: lm36274: do not set chip settings in DT parsing function Date: Fri, 18 Sep 2020 00:33:23 +0200 Message-Id: <20200917223338.14164-36-marek.behun@nic.cz> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200917223338.14164-1-marek.behun@nic.cz> References: <20200917223338.14164-1-marek.behun@nic.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.nic.cz X-Spam-Status: No, score=0.00 X-Spamd-Bar: / X-Virus-Scanned: clamav-milter 0.102.2 at mail X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These settings are not parsed from DT and therefore semantically should not be set in function with a name lm36274_parse_dt. Signed-off-by: Marek BehĂșn Cc: Dan Murphy --- drivers/leds/leds-lm36274.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/leds/leds-lm36274.c b/drivers/leds/leds-lm36274.c index 294edcc054bea..b61c97ed26603 100644 --- a/drivers/leds/leds-lm36274.c +++ b/drivers/leds/leds-lm36274.c @@ -100,14 +100,6 @@ static int lm36274_parse_dt(struct lm36274 *chip, fwnode_property_read_string(child, "linux,default-trigger", &chip->led_dev.default_trigger); - chip->lmu_data.regmap = chip->regmap; - chip->lmu_data.max_brightness = MAX_BRIGHTNESS_11BIT; - chip->lmu_data.msb_brightness_reg = LM36274_REG_BRT_MSB; - chip->lmu_data.lsb_brightness_reg = LM36274_REG_BRT_LSB; - - chip->led_dev.max_brightness = MAX_BRIGHTNESS_11BIT; - chip->led_dev.brightness_set_blocking = lm36274_brightness_set; - return 0; err: fwnode_handle_put(child); @@ -142,6 +134,14 @@ static int lm36274_probe(struct platform_device *pdev) return ret; } + chip->lmu_data.regmap = chip->regmap; + chip->lmu_data.max_brightness = MAX_BRIGHTNESS_11BIT; + chip->lmu_data.msb_brightness_reg = LM36274_REG_BRT_MSB; + chip->lmu_data.lsb_brightness_reg = LM36274_REG_BRT_LSB; + + chip->led_dev.max_brightness = MAX_BRIGHTNESS_11BIT; + chip->led_dev.brightness_set_blocking = lm36274_brightness_set; + ret = devm_led_classdev_register_ext(chip->dev, &chip->led_dev, &init_data); if (ret) -- 2.26.2