Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3053218pxx; Sun, 1 Nov 2020 21:03:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJxkQ++jgtaC35eFmVFAxvTuUEQ125tZPAFdI6WIB9YSNR/HxXFimT+skYNGfIsFfZ8mvM2r X-Received: by 2002:a17:906:aec1:: with SMTP id me1mr14329482ejb.225.1604293414597; Sun, 01 Nov 2020 21:03:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604293414; cv=none; d=google.com; s=arc-20160816; b=cq4EgRJ63dqcuG2p9ppQGhhGpJZ5gcte/qWvA2XQWb7UeFXX5PIH6KBlqOpj+/kd5t lfKzuYoSCARTIZ9dWHSbqnju4gOmw9MvJbNiuqFd+QYRn4VmM1kCVss26QHJzpT/zOt3 3dMZiaCH+YQdgOtH5UQAF+y3uW0d68slAWZqImqFkKlxd988zhjSTDABepyqn8//3lTR bm/TmzXmWrNH8zPdZ1sxvtr8yvP06TP8c6bRwnPUSEcCWfFwaMdOGezdcrSlpHFvFeO1 kIF48W95tV3Gb8lSmvaeq6293CXlau4grLjWfxfa+BivRIz+byDNLXnoNu0z7IhRKRtT jmBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=K02E9Q2eJoit2mw59sTVq8JgZJ/xKtklxtwqLjjQ268=; b=zOG6mLN5xc55TkolgRVv/7UKLJyiwA9jVb/W1hqeHP913JYS8SmV+ct2mtIrRiNRcz WLE9dq9NU5vh9cHK4CLWclerGNoP/APCl6s13rkROgSkrkf7uRyLWIDdmJFKnQQ+IwbC 27DVxZcx7+/3JI3jRKH2fxVvE7rDThQMnYoDS5T0HsJZEc9zn8AmjsIthY14wRdWvbzD Okx+JWlt1c0KZQN0yCcB0nmMOq6h8kJcoagKXj2KAYwbIAKTRsVBfHZ8tMqqZNxlLOzT OyAITp9fgbgH0VDfe36GZsvUqN/My6gwrn+BJIPPeV9ASGvlz1M8AxwzBC42qarGu/5/ z7IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="BpEUXHq/"; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u21si10885951eda.513.2020.11.01.21.03.10; Sun, 01 Nov 2020 21:03:34 -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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="BpEUXHq/"; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726121AbgKBFBw (ORCPT + 99 others); Mon, 2 Nov 2020 00:01:52 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:51646 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725208AbgKBFBw (ORCPT ); Mon, 2 Nov 2020 00:01:52 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0A251kgO013816; Sun, 1 Nov 2020 23:01:46 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1604293306; bh=K02E9Q2eJoit2mw59sTVq8JgZJ/xKtklxtwqLjjQ268=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=BpEUXHq/1iHq5a4d+273TJ8VpsxThxJM8NYf4bFkKJJPATEY8MvkB0DWl3BiQrMzk OtJ4l5/jqolGe7YB/nCYv7HEljWtp+858ZhSa3lQoQ6qO0npXrNCd6vthGLifnqRal jBaPLSAWPK1lgGmwTNhpwsH+kyGTAWGxnvZfIFIc= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0A251kX2111430 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 1 Nov 2020 23:01:46 -0600 Received: from DFLE114.ent.ti.com (10.64.6.35) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Sun, 1 Nov 2020 23:01:46 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Sun, 1 Nov 2020 23:01:46 -0600 Received: from [10.24.69.20] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0A251hgt076290; Sun, 1 Nov 2020 23:01:44 -0600 Subject: Re: [PATCH] pwm: lp3943: Dynamically allocate pwm chip base To: =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= CC: Thierry Reding , Lee Jones , , , Sekhar Nori References: <20201030134135.28730-1-lokeshvutla@ti.com> <20201030201117.x5asfjxh7htwv35s@pengutronix.de> From: Lokesh Vutla Message-ID: Date: Mon, 2 Nov 2020 10:31:42 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20201030201117.x5asfjxh7htwv35s@pengutronix.de> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Uwe, On 31/10/20 1:41 am, Uwe Kleine-K?nig wrote: > On Fri, Oct 30, 2020 at 07:11:35PM +0530, Lokesh Vutla wrote: >> When there are other pwm controllers enabled along with pwm-lp3943, >> pwm-lp3942 is failing to probe with -EEXIST error. This is because >> other pwm controller is probed first and assigned pwmchip 0 and >> pwm-lp3943 is requesting for 0 again. In order to avoid this, assign the >> chip base with -1, so that id is dynamically allocated. >> >> Fixes: af66b3c0934e ("pwm: Add LP3943 PWM driver") >> Signed-off-by: Lokesh Vutla > > Reviewed-by: Uwe Kleine-K?nig Thanks. > > With this patch applied only the pwm-ab8500 driver is left not using -1 > for base. pwm-ab8500 is assigning ab8500->chip.base as pdev->id. At least in the DT case pdev->id is always -1(as of today). So, base is being allocated dynamically in case of DT. Thanks and regards, Lokesh > > Best regards > Uwe >