From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6942C388F2 for ; Mon, 2 Nov 2020 05:01:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 95D0E21D91 for ; Mon, 2 Nov 2020 05:01:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="BpEUXHq/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726749AbgKBFBw (ORCPT ); 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 >