Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2947210imu; Fri, 18 Jan 2019 02:02:50 -0800 (PST) X-Google-Smtp-Source: ALg8bN5Dx989dsyBXT7HXwoO9ECmBf1TJlb8HA2h4BAU/X0ih/GyNSvwHBqMjfeUXpwdbRKuYfII X-Received: by 2002:a17:902:a03:: with SMTP id 3mr18719902plo.112.1547805770198; Fri, 18 Jan 2019 02:02:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547805770; cv=none; d=google.com; s=arc-20160816; b=DBBjtHnBEMBYkjwVV0qJMQ8yUaFx5MtifFhY8qgCuvTO44NrSshaxXTWtwlPmKFslO vSkWIFXA3V0I0Yzn1iulZVID/8TVMrLV8GgTE5fEwJbhEtiKfmMvHvIN3OfZzULfF/Kc IBE3ktEoSx27YQtXR08Pb9EPFzVF/jNd9iDwufJTca97UJUEUFFIl1exo6nZdnGiu/yV N/cMn+eKAMIQMX0wS7D86uDzRVL6miOhaFlhfA1o9AQKJzggqgk5y0/9iCV8JlSHrqyC HbABpWG307S5UixFSTL/iqw+tyDi1XTHYydYaHBqZkfpGrQujmVYny9FvlofExEwSOgN 2vPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=NlWFDmH2Z7TyEr3/mM9p9t2F6aX7tpjd91lUEQF3BYg=; b=vNhf/LLmm86T/4E+9JTEyZJgF8Q7thRHBHOBgyh9mKCoiTentsurkhz0C/TJhELVoX h4ljgUtCDiSl4ZuPZuu0dAb9HENaQpC/bnW8e3XtSZC5hmj/6RQTTG0xV9CgMJ2u/uJl HI0DPhueBejTtW1jWIYSjNwHqwBcN5u5LSXVXdwd0QNi1Reu6OvtTCu+DssesxA0pgKH tgHVjMjfFQy60wvDvhX3T3iEq5U7wNkEHB0ozzD2RA322ZYZWwFtzhLzx6BKOzsBTtGp 6t2GsECvr9h5RWr9OV7sQr8xgI78UTeONtjSrHXTXC+J3KgKdKm7iicrMYZkijrqvcjr vbkw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k20si4295643pfb.215.2019.01.18.02.02.33; Fri, 18 Jan 2019 02:02: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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726838AbfARKBT (ORCPT + 99 others); Fri, 18 Jan 2019 05:01:19 -0500 Received: from Mailgw01.mediatek.com ([1.203.163.78]:29815 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726062AbfARKBT (ORCPT ); Fri, 18 Jan 2019 05:01:19 -0500 X-UUID: 985531b764df4676b7349a91f8c3c67d-20190118 X-UUID: 985531b764df4676b7349a91f8c3c67d-20190118 Received: from mtkcas36.mediatek.inc [(172.27.4.250)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 2140491853; Fri, 18 Jan 2019 18:01:11 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 18 Jan 2019 18:01:09 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 18 Jan 2019 18:01:09 +0800 Message-ID: <1547805669.8969.4.camel@mtkswgap22> Subject: Re: [PATCH v1 1/5] pwm: mediatek: add a property "mediatek,num-pwms" From: Ryder Lee To: Uwe =?ISO-8859-1?Q?Kleine-K=F6nig?= CC: , , Sean Wang , Weijie Gao , , Thierry Reding , , Matthias Brugger , Date: Fri, 18 Jan 2019 18:01:09 +0800 In-Reply-To: <20190118095313.pbpdn43hd76khg2x@pengutronix.de> References: <20190118075925.noilab6glzm3cig6@pengutronix.de> <1547804574.8124.6.camel@mtkswgap22> <20190118095313.pbpdn43hd76khg2x@pengutronix.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2019-01-18 at 10:53 +0100, Uwe Kleine-König wrote: > Hello Ryder, > > On Fri, Jan 18, 2019 at 05:42:54PM +0800, Ryder Lee wrote: > > On Fri, 2019-01-18 at 08:59 +0100, Uwe Kleine-König wrote: > > > Hello, > > > > > > On Fri, Jan 18, 2019 at 11:24:41AM +0800, Ryder Lee wrote: > > > > This adds a property "mediatek,num-pwms" to avoid having an endless > > > > list of compatibles with no differences for the same driver. > > > > > > > > Thus, the driver should have backwards compatibility to older DTs. > > > > > > I still think Thierry should bless "num-pwms" without vendor prefix. > > > > Okay. > > > > > > Signed-off-by: Ryder Lee > > > > --- > > > > Changes since v1: add some checks for backwards compatibility. > > > > --- > > > > drivers/pwm/pwm-mediatek.c | 27 ++++++++++++++++++--------- > > > > 1 file changed, 18 insertions(+), 9 deletions(-) > > > > > > > > diff --git a/drivers/pwm/pwm-mediatek.c b/drivers/pwm/pwm-mediatek.c > > > > index eb6674c..81b7e5e 100644 > > > > --- a/drivers/pwm/pwm-mediatek.c > > > > +++ b/drivers/pwm/pwm-mediatek.c > > > > @@ -55,7 +55,7 @@ enum { > > > > }; > > > > > > > > struct mtk_pwm_platform_data { > > > > > > Unrelated to this patch: This name is bad. This struct is not used as > > > platform_data and so should better be named mtk_pwm_of_data. While at > > > criticizing existing stuff: I'd prefer pwm_mediatek as common prefix to > > > match the filename. > > > > I think we can take care about that in another patch. > > That's what I wanted to say, right. Do you follow up? Yes, I will do that. > > > > - unsigned int num_pwms; > > > > + unsigned int num_pwms; /* it should not be used in the future SoCs */ > > > > > > I'd drop this comment in favour of a runtime warning. > > > > Sorry, I can't get you here. > > I'd do a > > dev_warn(dev, "dt didn't specify number of PWMs, falling back to %d\n", pc->soc->num_pwms); > > to make people aware that updating the dt would be nice. Okay! Thanks Ryder