Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3269209pxj; Mon, 7 Jun 2021 06:41:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwynDcRomIK0M09mW8APmc/J6K9FQCHb4R2Cal5ayZa7gFDPV95F/pm2XGfKC2r/QEAcqGV X-Received: by 2002:a05:6402:342:: with SMTP id r2mr20419770edw.69.1623073311736; Mon, 07 Jun 2021 06:41:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623073311; cv=none; d=google.com; s=arc-20160816; b=gHHpgyAVfvuNzuv4T1MEpGNWtzQma1gubYqQn6Yd7OIg1VE+KWeAKnj5YDQsDFF2Za 12CR9A6EJOmAyw6nLuXkuf/eHew6WsWxQAxw8iqByTovJKlgnsexM6zTW/BxA1Sk2Pp1 YEzfAhKwXSCs504VllMMAniQac+B0LbElueylp6Yu7+3dH079b//97PV6SeJDVY2T5/j JXmtu+DlWGjkcuFGj/HZErEZ0oD4r2n5J5N8/AITG8e0ZHANMFQzAHJK5gywj7vx3Znt wUc4A1XFYsYmTjQrWVOOqssSojmu5BnwZ7Ek73qM5HdOm/VL7KAb3vnHfNgjAwprsaUp xhfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=VlXDuzHKluTkhD5zvNM3nuwm1YIsxipLM0a14l1XdN4=; b=NAAUXCtlkubftLR6vuk68nZv2cbsqY8Sp0St8PzQqV6vTKOmQdRJ9r38ZH72ddvA9N 51NODK50/C7D8LAKM7ADqIjoGc3gUeypPdS5BM1gC4VudFmnv0myNPsRhkmN0QGdi0Ha DhHPtZiF/N1/VgwTMrYMpTHbV5+5nqC96HkH28R3yNT5wx4u6pLJq94COmLJ8LK0ONdB vv503qbveLWVzdqww9jxbs1J5N7rTnviasCcwo7pxCVtdup8h45RduFzoirN1tpRFncM PnWCHjE6VV0E893NEdwu772Zmhz5tuHj/+i86uFc4w/+ztRPwmdcAp+zb48DZiUcoBZt Z6zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=n8zru0aj; 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 v27si12487781ejf.542.2021.06.07.06.41.29; Mon, 07 Jun 2021 06:41:51 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=n8zru0aj; 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 S230383AbhFGNlr (ORCPT + 99 others); Mon, 7 Jun 2021 09:41:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230378AbhFGNlr (ORCPT ); Mon, 7 Jun 2021 09:41:47 -0400 Received: from mail-yb1-xb2a.google.com (mail-yb1-xb2a.google.com [IPv6:2607:f8b0:4864:20::b2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 259FFC061766 for ; Mon, 7 Jun 2021 06:39:56 -0700 (PDT) Received: by mail-yb1-xb2a.google.com with SMTP id y2so24920126ybq.13 for ; Mon, 07 Jun 2021 06:39:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VlXDuzHKluTkhD5zvNM3nuwm1YIsxipLM0a14l1XdN4=; b=n8zru0ajQmXsS/hEV3K5YVM3VTbwv84fG1iqwEZFzABWmUcpIeP4t4ig/EFDRd9yDA eZB48b6Ly6VNPnXr73amlDSMG0r/VezuhvcsKSFpah8S2e7lKfvs/qGWGGamaPumOifr zFEqSwx6HmC+e/Bpv1U5ZgvSEffPWaOh4aOlFeOS0Nzc2+bb4K9M4ZW0pTnKzlRp/YBr SqrS4PmCxyL1Rdwj8rOA9V/hbBEuNKtYHvq4VvrLr+7CRk1fzh7Ow23flTk5JsDw1v/2 noPrzfDIyrwMiyxoRJruQXw3fpyOwEEg1+KQZl9NLomTE/ZYSQkVpi4CXrsguCnf+cib oy1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VlXDuzHKluTkhD5zvNM3nuwm1YIsxipLM0a14l1XdN4=; b=Odj2lKqaT/+6h203prlLyHjxNAY/00B8TDsPLiPOSpJb/7Gn5hfUgucojGlDom6aCa B3j3P+xGWgZT5dCZaUiQTExGyPcSSK7nb1PdrfTV/SNqGSbhQ2+I1Po+gpVBWIGY8Nxg l0j8SzcPqWk97gTuBocRPtvwJ2NS+5jbHTbYfBs6yziQnfOLaAo168pyKuhknv6BUPen Fo/ACh2UJ5GAYAs3kESPhQ2zh+ZfWI3l1gKoDSDdFAph4E1pmnioOI6AwNxXDOp4oPU9 Dy9dySu2h5kMxOu+ug5RL53zFz1oRYfeYezkiXSSz7lYDn3mC4cM1bCtmArmAstX6io+ xUXw== X-Gm-Message-State: AOAM533dCc5dNbw8zbyjX7b92Bs7Ob/KTO5B+/I9kcOvXa4g4ddSuDlh BYpaSkb8X6ISq8efXbvAiAwUHnRsDx0BlCKzj2a/ZQ== X-Received: by 2002:a25:1ec2:: with SMTP id e185mr23958988ybe.23.1623073195494; Mon, 07 Jun 2021 06:39:55 -0700 (PDT) MIME-Version: 1.0 References: <20210604225857.18694-1-michael@walle.cc> In-Reply-To: <20210604225857.18694-1-michael@walle.cc> From: Bartosz Golaszewski Date: Mon, 7 Jun 2021 15:39:44 +0200 Message-ID: Subject: Re: [PATCH v2] gpio: regmap: move drvdata to config data To: Michael Walle Cc: linux-gpio , LKML , Linus Walleij , Matti Vaittinen Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 5, 2021 at 1:01 AM Michael Walle wrote: > > Drop gpio_regmap_set_drvdata() and instead add it to the configuration > data passed to gpio_regmap_register(). > > gpio_regmap_set_drvdata() can't really be used in a race free way. This > is because the gpio_regmap object which is needed by _set_drvdata() is > returned by gpio_regmap_register(). On the other hand, the callbacks > which use the drvdata might already be called right after the > gpiochip_add() call in gpio_regmap_register(). Therefore, we have to > provide the drvdata early before we call gpiochip_add(). > > Signed-off-by: Matti Vaittinen > Signed-off-by: Michael Walle > Reviewed-by: Linus Walleij > --- Applied, thanks! Bart