Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4121252ybi; Tue, 18 Jun 2019 12:10:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwO8SeGzbSLfPWCqc3svHIFFcIIMp5YMTD5KtQ8dg0OYNU18da/KXCSM7rTyjlelCO8YXgS X-Received: by 2002:a17:90a:af8e:: with SMTP id w14mr6922728pjq.89.1560885048164; Tue, 18 Jun 2019 12:10:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560885048; cv=none; d=google.com; s=arc-20160816; b=wXCrxw7fP9ffKR0A6k7+Is4JzdKeKXmUjTf524hz9OBH1C4SdeLZ9DpaBpVu2bb9oA a9LR8lXVGzdup+js24H0f0cYWdlfRgMjuyZhxPFO7iIA5+Oo1ncjwGr8tXK6lzPAqDxS zPKi/0cYxUdrCuM3/QjQ+zGMtxNVF0EubxueBFnndVY3/kxFJxHdRIL5KYMuwMhzs5DX u0bpHZWZCcVbMUQ+CCVTkK8lziw3ijbX8c/qYWAnSSO2cyFrHBQBlV6l9EPrgul+xkPu Vi0eHlSx+ks7kOxONcNiCNEMEbtHO+9zAZq7aTcMzAqyW42HA0/G0gsrioAcoYS5FJi7 z71g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=u69+nLXPtFpbs6TaePvjeaTV79sjBn+0kMLOo8QV9dQ=; b=ROiFDwtoN5E+EIpYpx811qZqwrLBh1A7CLJVnGSlGLY5HaXxaQcg1iHDEL+8BQEofp ztUqPU4GLVhUSr60XVfRLykjQPWNElFcyPOpSdo8BxxmE/WfYnYVHEd+hghvl0ussY3B 9M3us87rQ5GQExmk6FdkP061Su/BIwdZPRqvxvRGYaBUnJ9rNuV4RW3i+Y1sXLltT8Bl u5IlNHjIWfWfjcR6y+wqDmzWRrq0p3iqlrbp35rnfKlBJFk33zb/TCvC+izyT5jdp+g6 V1/i7uPysCbxeGCDaBEtcRyuZy+e6u8ZQEEPiqDeHoAsMBsJkJL9oOxEm55Xt4c9Fo/n goQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=NmHlXE54; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y73si15023331pfg.257.2019.06.18.12.10.32; Tue, 18 Jun 2019 12:10:48 -0700 (PDT) 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; dkim=pass header.i=@google.com header.s=20161025 header.b=NmHlXE54; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730445AbfFRTKY (ORCPT + 99 others); Tue, 18 Jun 2019 15:10:24 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:36759 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727386AbfFRTKX (ORCPT ); Tue, 18 Jun 2019 15:10:23 -0400 Received: by mail-lj1-f196.google.com with SMTP id i21so689574ljj.3 for ; Tue, 18 Jun 2019 12:10:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=u69+nLXPtFpbs6TaePvjeaTV79sjBn+0kMLOo8QV9dQ=; b=NmHlXE549XG+CtzrGl8FRRUnyJMBn0Ba3aS5JivNDC+A5JPz2Yu7wHyIBXn4Xp8E6V +tknKiyvaCuv7ze4AXJHR1qp5i7fvOJbOcw0iJuAu8/91zOGW2QYkqYeW/ZI+k12mSww yEB2J+NHetS/6lLWvIHXYEa6iGpBEbKM3+uhjB+46CZxoFqr6MT/QQKwf/g+FPF8/EVX O/C88+IQ8Ukt0L/7G3GXgQizQAp2VJqMnGDnMDKs1x3n7CHM9tmtaSJw+YQPD5aUGWei chsoQnxg+awKflDM5STp2/1scSzQmrXB9sZ15ScrhAFF2S0zvQ0N6eAS+i1ovwkGolRH 5sRQ== 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=u69+nLXPtFpbs6TaePvjeaTV79sjBn+0kMLOo8QV9dQ=; b=tl6mwz1JivHP4kI1BRP1vrh0OvtR4T5ucAkmxWpUP3b7U0R3nzBuWoSZ2aMp95cpq+ cF7FwYLSjmcszjkBSz8csJv60wzGL08ro9ZKRmbHZVxQy/W6ykCegWmcvwC7q4LldRja cMI/LXo1jalcZi9Tr4WnfZ9H/b0oQj57t1l0uJ+i5X/teJQbIIVsg1lc9aI1+GksftBF BK/W0f/S+BdWkPn2ssn2wCUqNPNcpXF6KTxxdVfBLNIRoRXEEnCUgWDRFZdTnvnO4IPG J3cXj6cOyruta2rzOAPmfFELHg+gZiv9yPaZ69yWaQphWmhQUOSupWI0QGEgjcAOzrl/ lWHA== X-Gm-Message-State: APjAAAUaGwNsD/CJexll/NhEyA6dwgOPJgNxk77rk2jrSKEYP/PWskO/ X6rUtZiJTM1CQklp3NkrgTSd/Rsj1gr3m1seuijNDQ== X-Received: by 2002:a2e:4a1a:: with SMTP id x26mr47206359lja.207.1560885021249; Tue, 18 Jun 2019 12:10:21 -0700 (PDT) MIME-Version: 1.0 References: <20190614194854.208436-1-fletcherw@chromium.org> <20190614194854.208436-4-fletcherw@chromium.org> <4e560e12-4c20-8d5d-b3f9-587a55da279d@intel.com> <20190618184710.GP5316@sirena.org.uk> In-Reply-To: <20190618184710.GP5316@sirena.org.uk> From: Curtis Malainey Date: Tue, 18 Jun 2019 12:10:10 -0700 Message-ID: Subject: Re: [PATCH v7 3/4] ASoC: rt5677: clear interrupts by polarity flip To: Mark Brown Cc: Fletcher Woodruff , Cezary Rojewski , Linux Kernel Mailing List , Jaroslav Kysela , Liam Girdwood , Oder Chiou , Takashi Iwai , Curtis Malainey , Ross Zwisler , ALSA development Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 18, 2019 at 11:47 AM Mark Brown wrote: > > On Tue, Jun 18, 2019 at 11:12:58AM -0700, Curtis Malainey wrote: > > On Tue, Jun 18, 2019 at 11:01 AM Fletcher Woodruff > > > On Sun, Jun 16, 2019 at 10:56 AM Cezary Rojewski > > > > On 2019-06-14 21:48, Fletcher Woodruff wrote: > > > > > > + ret = regmap_read(rt5677->regmap, RT5677_IRQ_CTRL1, ®_irq); > > > > > + if (ret) { > > > > > + pr_err("rt5677: failed reading IRQ status: %d\n", ret); > > > > > The entire rt5677 makes use of dev_XXX with the exception of.. this very > > > > function. Consider reusing "component" field which is already part of > > > > struct rt5677_priv and removing pr_XXX. > > > > I was using dev_XXX, but I believe Curtis found that 'component' was > > > sometimes uninitialized when this function was called, so I switched > > > back to pr_XXX. I may be misremembering though, so I'll let Curtis > > > comment as well. > > > The issue here is that the IRQ is setup in the i2c probe and the > > component is setup in the codec probe. In theory if the hardware is in > > The component is not needed for a struct device, you must have a struct > device if you have a regmap or have probed at all. Ah yes, we could modify the struct and store the i2c device and get the device out of that as well. That will likely be simpler. Ok lets do that.