Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp841947pxb; Wed, 13 Jan 2021 18:02:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJy8B9G6+geJtmi+YOhD8vD4o8w//QpRe77zT0OmtoNW/osv3fr2GyHO3riB/EW7xYAUKBht X-Received: by 2002:a17:906:a106:: with SMTP id t6mr3693850ejy.63.1610589777097; Wed, 13 Jan 2021 18:02:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610589777; cv=none; d=google.com; s=arc-20160816; b=RzG9hSwzD4hPymA6ismYV5PhXONvLR3ewj7Wyafp6CDnsLZZGTJhGPZkaOLCBc6N7Y W7gdLY941UXGYE/o7IYkclUIbghBdVj0xGitikrGFON/codEa8lvSt2gR/1et59oCkw6 hc9f3qev8suNl7olGE3jVw/JINbY2z1ggKRVlhIMZbgIE1htVWjXAbRL5PCqbgmBChHw rHfqXjvi8h9qK8P5iBtRvyxpzmKJWSwZJw+zVqGd/zjfXvg/bIeSF2IFWZpna7+DCacE jVuaztJlIRAo09zSPHcvkz6cmBAXHhabZiKQOEDdh7h3eybE0Q3/89063vbov0TTT3k6 u97g== 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:subject:cc:to:from:date :dkim-signature; bh=kWNyCcRqQWlgKgnePjwJfWQop1S4JCvLZgBInQUzPdY=; b=B1US40SVCi3JywV7O6AEKyyoXv25YKkrFHJk15x3jFhz3M3iJQHZeyIixXGdQv3Ghy HdVQIWpAioQikM8W6fHjRrbktK2wwzxIQVyV+112LVjjtE9MqxGjDkHD3eWFx1WwV7BO cx7RNDBUZhhAPap5cBKXJ/UUmiBCxqDTCpzkdpeXxdK2DpZRjDOh5WPhF8YJAqNYX4an agSEH8M2GDCT1dR6fN9kV7cM+S61itkVGFLkvYfPSr9frwQQrwtKMWW50Xpxhiq0NW8W Txih6fUfJ/BVB1q+GcOrk1PRD6EvY+GYxeU9JMecVBKtg7YMHr6vXmZh2nTxbjhSYCpX 4q+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=cqqmJ5rb; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v11si1868850edy.157.2021.01.13.18.02.30; Wed, 13 Jan 2021 18:02:57 -0800 (PST) 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=fail header.i=@kemnade.info header.s=20180802 header.b=cqqmJ5rb; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729795AbhANCBj (ORCPT + 99 others); Wed, 13 Jan 2021 21:01:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729469AbhAMXY6 (ORCPT ); Wed, 13 Jan 2021 18:24:58 -0500 Received: from mail.andi.de1.cc (mail.andi.de1.cc [IPv6:2a01:238:4321:8900:456f:ecd6:43e:202c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C26DC061794; Wed, 13 Jan 2021 14:47:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20180802; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=kWNyCcRqQWlgKgnePjwJfWQop1S4JCvLZgBInQUzPdY=; b=cqqmJ5rbEOL8avTUSGdWvUEsyN YmOrhjodRNocq95noo1yW7xFc/YxPEbxUlTSECyMnjQRmfqcQIYg1IkZ3XftK/RIouJA9jekWt3Od o0w5+GxUdYuGcw4JZR4iKMzIRpSn6IUGH1Pk8SkeMQpRx7lZbCnk4M/Lf6cW/tJYgryM=; Received: from p200300ccff0ba2001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:ff0b:a200:1a3d:a2ff:febf:d33a] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1kzouc-0001n0-7u; Wed, 13 Jan 2021 23:46:47 +0100 Date: Wed, 13 Jan 2021 23:46:45 +0100 From: Andreas Kemnade To: Jonathan =?UTF-8?B?TmV1c2Now6RmZXI=?= Cc: linux-kernel@vger.kernel.org, Lee Jones , Rob Herring , Thierry Reding , Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= , Alessandro Zummo , Alexandre Belloni , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Sam Ravnborg , Linus Walleij , Heiko Stuebner , Stephan Gerhold , Lubomir Rintel , Mark Brown , allen , Mauro Carvalho Chehab , "David S. Miller" , devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Heiko Stuebner , Josua Mayer , Arnd Bergmann , Daniel Palmer , Andy Shevchenko Subject: Re: [PATCH v7 4/7] pwm: ntxec: Add driver for PWM function in Netronix EC Message-ID: <20210113234645.52fcf73c@aktux> In-Reply-To: <20210112203902.4e196d11@aktux> References: <20210109180220.121511-1-j.neuschaefer@gmx.net> <20210109180220.121511-5-j.neuschaefer@gmx.net> <20210112203902.4e196d11@aktux> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -1.0 (-) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 12 Jan 2021 20:39:02 +0100 Andreas Kemnade wrote: [...] > > +static int ntxec_pwm_probe(struct platform_device *pdev) > > +{ > > + struct ntxec *ec = dev_get_drvdata(pdev->dev.parent); > > + struct ntxec_pwm *priv; > > + struct pwm_chip *chip; > > + > > + priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); > > + if (!priv) > > + return -ENOMEM; > > + > > + priv->ec = ec; > > + priv->dev = &pdev->dev; > > + > > + platform_set_drvdata(pdev, priv); > > + > > + chip = &priv->chip; > > + chip->dev = &pdev->dev; > > Hmm, I needed > chip->dev = &pdev->dev.parent to use the backlight example > in patch 2/7. > Not sure what the correct solution is. Maybe the pwm deserves its own > devicetree node. > probably just assigning the node from the parent. pdev->dev.of_node = pdev->dev.parent->of_node; Regards, Andreas