Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E05CC636D7 for ; Fri, 17 Feb 2023 18:57:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229708AbjBQS5v (ORCPT ); Fri, 17 Feb 2023 13:57:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbjBQS5s (ORCPT ); Fri, 17 Feb 2023 13:57:48 -0500 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 378ADDBD3; Fri, 17 Feb 2023 10:57:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676660267; x=1708196267; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Kn7qpzTziPZG5RLjHRl38QHUkvLrNje88ohem0j/xnQ=; b=eAcz26qp6VNTTQXZi9Cb4Lp+pa1LrMYsJaRpyfb8fB4hmo7ut+j8zxRK +7E/0NadKHdVSk2mDrIDyee0+S+ovDuWTzyd8yR5V1xe0exvyJVpCcW1p /nckp/SNxspZIP5o38YFXOLw+p79HrKgDJpJuIcVjU//oCmGv2PTXWAAQ WucN44Ncd921eYt+Ft1I9xLERQrda2aemTurATVyaHCh3432tvFq8tkgg 95+lgJEo2KwJgQEWxendE7NI09JOdLsJ/mkdoJB7sneqbuZ9P81jo/DgD 1KrBU/NVzFtRCoV6FS3K8LM05QEjsRMxqJkjB5HB1/qju59jZdnUHlqV9 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10624"; a="359514297" X-IronPort-AV: E=Sophos;i="5.97,306,1669104000"; d="scan'208";a="359514297" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2023 10:57:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10624"; a="813466845" X-IronPort-AV: E=Sophos;i="5.97,306,1669104000"; d="scan'208";a="813466845" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga001.fm.intel.com with ESMTP; 17 Feb 2023 10:57:45 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pT5vT-008KPI-37; Fri, 17 Feb 2023 20:57:43 +0200 Date: Fri, 17 Feb 2023 20:57:43 +0200 From: Andy Shevchenko To: William Breathitt Gray Cc: linus.walleij@linaro.org, brgl@bgdev.pl, broonie@kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/6] regmap-irq: Add no_status support Message-ID: References: <1e14e042c84f0c0a5e7d25ae9986f88a9620965c.1675876659.git.william.gray@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1e14e042c84f0c0a5e7d25ae9986f88a9620965c.1675876659.git.william.gray@linaro.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 08, 2023 at 12:18:16PM -0500, William Breathitt Gray wrote: > Some devices lack status registers, yet expect to handle interrupts. > Introduce a no_status flag to indicate such a configuration, where > rather than read a status register to verify, all interrupts received > are assumed to be active. ... > + /* no status register so default to all active */ > + memset(data->status_buf, 0xFF, > + chip->num_regs * sizeof(*data->status_buf)); memset32()? As we know the sizeof()... ... > + /* no status register so default to all active */ > + d->status_buf[i] = -1; -1 for unsigned?! Can we simply use GENMASK() just plain value? ... > * @status_invert: Inverted status register: cleared bits are active interrupts. > + * @no_status: No status register: all interrupts assumed generated by device. > * @runtime_pm: Hold a runtime PM lock on the device when accessing it. > * > * @num_regs: Number of registers in each control bank. > @@ -1630,6 +1631,7 @@ struct regmap_irq_chip { > unsigned int clear_on_unmask:1; > unsigned int not_fixed_stride:1; > unsigned int status_invert:1; > + unsigned int no_status:1; > > int num_regs; Seems a bit unordered, I have just sent a patch to fix ordering of the couple of fields and their respective kernel doc. -- With Best Regards, Andy Shevchenko