Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3917561pxb; Sun, 24 Oct 2021 14:51:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynjdcvv3B2IvOgzM37NmknIyNB6lbV0Cu343lywydJPc61AKeSoLqObdoQlAc8U7F07Ero X-Received: by 2002:a63:79c1:: with SMTP id u184mr10848900pgc.19.1635112271497; Sun, 24 Oct 2021 14:51:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635112271; cv=none; d=google.com; s=arc-20160816; b=GDFmxGI6uAq1Z55ZTfZsUtmVOnmk6fGikn67jBHslrEdBPsAaoir4UENR1KHtk94qa JRhKUL5RdQpaW7rgmlvghvWdv/5v/M0w8g6ey6/2OHqwK0PFWjUvqlEygIs/TGltMDXF TJsUCP0eFZveQQC2XohIrFFwd40Yjg0nnSmGjUedWC2MuDGH2ra7iHFrwRlB5Jgnvgn9 mrmfz6xuWayscX+zdOgxh8s6PhgZNRO882gpO2DHnzG80epKjiuAanCCHonlR/7F/tER XBfLMoVSq49OK7pjl2XNcYJXs2ucKdrtgRu83y1JIdt5YQJOhow0yEZXxNUFdun5ywiO cFDA== 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=zqFQsFklz0z9fcfedYbprvhik13AFhIEkeGZ0J9HMVs=; b=k4LoK+IxBnwFHaqoFicIsKVRpTEGZ/t5lsWFa8eMdRe/cJfpv23lfMjUylQV7r5e+D 8sziQ8g9ond+CbWrjR7tqAuXAx/s5eEZ9GOfWTTEDbW41X/3FG/4Ss7+eOsc2LXEIB4C NqHtY3ia9A6Eu5+HzzIWPrNPelHQAgPOt7GGoID9AKngslfwfulDCV5qAI9SqN28aK2O kqRk1cejpYskZDxbeH9IQxy6AhLihk6wpeDNKvaHuyqsbwKUyVDrOCBishcBy2waJsJV yzDFnUvJCGmelI2omowq5I4QSaNfXaaVhMDcBcLO8yuOYUX8eC4n8+U2Yi1/kTewMyX+ TcaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vtdzNJXe; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k34si26469173pgi.413.2021.10.24.14.50.58; Sun, 24 Oct 2021 14:51:11 -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=@linaro.org header.s=google header.b=vtdzNJXe; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231912AbhJXVwT (ORCPT + 99 others); Sun, 24 Oct 2021 17:52:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbhJXVwS (ORCPT ); Sun, 24 Oct 2021 17:52:18 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E22A2C061764 for ; Sun, 24 Oct 2021 14:49:56 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id g36so7430330lfv.3 for ; Sun, 24 Oct 2021 14:49:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zqFQsFklz0z9fcfedYbprvhik13AFhIEkeGZ0J9HMVs=; b=vtdzNJXe7QO5brg0f8xsAF2K449Mc5q9vcJq0Qcq8K5HWgXm4fq6s2MKROR+wgugHh /7nPILVTts16rDHuo9n7Ix+IjkFiSOXKB1sHPByCN6zeoVpIAH8X8bakNSHYS8jS3DFJ qFYsBbZgfQ4Hl2cgMyBdeTsfNXF+Lgemm1NCR0+oLdvmTrr1+Y0DW5+nxCQZNxcHBjKd dNokp3lRaRxMNp0zsDdWXdyLEbdU6V82Sb2apqaRcu13h3cWCdlhEA0HjsU9/WSdGZ0p TIQ+zHPhHbesIkOXlzu7OuydUKuJ+6PM5Xx/tWhULpvKDZCWGlWYSCwJDMdzBlwny86K mMOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zqFQsFklz0z9fcfedYbprvhik13AFhIEkeGZ0J9HMVs=; b=7Q+SsBaUMgJmLvHZZsOQjAyStE0j3FUJFAxnm6t2lvuujRZgmaNHrtxFuZeF7F1m9q yvgXDRFehmtufWmRcKgo9qDfvA1/zPllX9/+K64QVeGE8KCntwL10WkCkjvCiywg8Iyx PRAEyWz1bi3lOU27j4LyOe5k02b/2pm4euStJusNoMdO+7+hxN62YD4bhtUvgDG7rDKC X2VdueNfSSa2dt6tcmqMDz6ecmHgphVOe86jlqOeErTX+DHcWXQpaRwm2qFSQWqqKZJJ ucqlLSsbTVCg2R1oeo/32+pFDeUnjfzk60UElVjNqTau1KKRss30UwfTx9DMuMUa/1KR FLlQ== X-Gm-Message-State: AOAM532Ke1rMHu6a1oD+KHX3ZJueUqMHbW/ZPqMiE6Znk/SyHXbF1val OXGXyz/JCaoccm+aYpkV8WAHgtYxa6h+QDTIJCKM/A== X-Received: by 2002:ac2:5d4a:: with SMTP id w10mr13208074lfd.584.1635112195140; Sun, 24 Oct 2021 14:49:55 -0700 (PDT) MIME-Version: 1.0 References: <20211018220504.8301-1-shreeya.patel@collabora.com> In-Reply-To: <20211018220504.8301-1-shreeya.patel@collabora.com> From: Linus Walleij Date: Sun, 24 Oct 2021 23:49:44 +0200 Message-ID: Subject: Re: [PATCH v2] gpio: Return EPROBE_DEFER if gc->to_irq is NULL To: Shreeya Patel Cc: Bartosz Golaszewski , Wolfram Sang , krisman@collabora.com, Sebastian Reichel , Collabora Kernel ML , "open list:GPIO SUBSYSTEM" , linux-kernel , linux-i2c Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 19, 2021 at 12:05 AM Shreeya Patel wrote: > We are racing the registering of .to_irq when probing the > i2c driver. This results in random failure of touchscreen > devices. > > Following errors could be seen in dmesg logs when gc->to_irq is NULL > > [2.101857] i2c_hid i2c-FTS3528:00: HID over i2c has not been provided an Int IRQ > [2.101953] i2c_hid: probe of i2c-FTS3528:00 failed with error -22 > > To avoid this situation, defer probing until to_irq is registered. > > This issue has been reported many times in past and people have been > using workarounds like changing the pinctrl_amd to built-in instead > of loading it as a module or by adding a softdep for pinctrl_amd into > the config file. > > References :- > https://bugzilla.kernel.org/show_bug.cgi?id=209413 > https://github.com/Syniurge/i2c-amd-mp2/issues/3 > > Signed-off-by: Shreeya Patel > > --- > Changes in v2 > - Add a condition to check for irq chip to avoid bogus error. This v2 looks acceptable to me. Reviewed-by: Linus Walleij Yours, Linus Walleij