Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1153299pxb; Fri, 21 Jan 2022 11:00:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+iuwNOeQDuWlbkGAiJjGPPh2Nmg+qgnIlJBWUfMXwkBOuXyl7r1FREaBCKpRV+Y4QsE8m X-Received: by 2002:a17:902:9887:b0:14a:199:bc51 with SMTP id s7-20020a170902988700b0014a0199bc51mr4933271plp.39.1642791623595; Fri, 21 Jan 2022 11:00:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642791623; cv=none; d=google.com; s=arc-20160816; b=Yqx0N0WjAVgafDKLfBfR7lyez3dIkNgB7qAWykGu8WPo5nhQl4F56dpqojTYLx2Tlx lImNqImuEbXe1kLEGOEvvxjVBpeKmhLBMjCULCfCQ4fSchbSjh5e3iigGfsLQq8P69Kz y98Ghvat79NsV+c3ogX9nNTL+zibBNT69q3hhJb4/UYA5hEgr1/5lgAZaI54wjCNXwnB Swl5KoEksBYQcVyjxlCISHbhtWHyg4H7cczHqO1EF02bhiNKE7Tp3InJwuq2nV4/ZNt3 wTWXzWwwkIXVEBRsyDx8azPCGjZ4thuVJZcSXXeetVWkR9gDvyB3+FFpVP7m+zt5k/xc C0TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=YD4iLLUZyr8CeCj03I9UusKK7X+cQDyntXdR+j7XGJ8=; b=hrtbNjRh/OGH68H2Z8jieGNOQWR2/OltfsFaxbTYPfr4u2WteSN+eGMRdyspXz+S1i arHeE/w9yJgVb37uaGTNYlvGaNBKjskH+tyrYocZViek76+4rNJf1Gvx+YYqkbBzY3W4 oviFQQ2zR2dHtWNUjRXPiUhRMd82MQBoawjY4JO73mGWNwrVFZ7593xGM3TMZFZjiiBv IoNOV93BQB0hi9bOV6oHrwVD5zwXjaWD6mgn0GmD5xDWLnf1LtigYmjeGyjIvrekUmwJ fGS45zvmgoDWx1M23q6+WUn33vPrELa23Hgk/yGfPRslxlYu4etN0ymxytj2qKyb3SLR 9YdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=2bdD5fFD; 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 k35si7434799pgl.310.2022.01.21.11.00.11; Fri, 21 Jan 2022 11:00:23 -0800 (PST) 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.20210112.gappssmtp.com header.s=20210112 header.b=2bdD5fFD; 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 S1352623AbiASIwe (ORCPT + 99 others); Wed, 19 Jan 2022 03:52:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352611AbiASIwb (ORCPT ); Wed, 19 Jan 2022 03:52:31 -0500 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A9F6C061574 for ; Wed, 19 Jan 2022 00:52:31 -0800 (PST) Received: by mail-wm1-x331.google.com with SMTP id l35-20020a05600c1d2300b0034d477271c1so4328131wms.3 for ; Wed, 19 Jan 2022 00:52:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YD4iLLUZyr8CeCj03I9UusKK7X+cQDyntXdR+j7XGJ8=; b=2bdD5fFDtv75HUstXnBK3i64pouZCKluoajegLjNS/RIy9+boLJLed8cYtKiE8oYls HZruaKZaiufFsHJjdrm23sDT0nX5lyuGPcuy96TROO0ii/86sQtHXWzcZlDP0mTwdisS 9xwiPZNzd/WEZeAGkq4oG/ePhkEZ68ZcruTJFHfYBf3Kk4ybzqDiAb156U7CoDdzEtH6 pllnlCwHANKu2EBhe16UTmuvPDvwbBDlWOAuOi16ZJrRqFY6yYEpuKFZcdyUsQC+xoJi UN9sbex47tUQ3XewCCsSzpNFtgLA1Xh/LUjkBqtKTJeV0vnwzjCgxoptlmyAjA2ij05V Chvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=YD4iLLUZyr8CeCj03I9UusKK7X+cQDyntXdR+j7XGJ8=; b=OsfipIYEQ3zXxderVqC/KHgE1UkA7kxrkES7BCy5OaaWIR2P7iF1IB+JbNi6MZ50gW lFjhnK3OEm6JEgc3p+fQG6enxS2YxC9apZHpJt2G/zs4CB4Kmilv4PZbwk7HmEFtCC0m nmil4NDYI2g8/4BdglbfjtSJwGIJmqt65arT+jv51SQk/yDyksQrBKG3dYuIOEBG4q2t 2d6QMXQPkhLrSZZFUfxnS+qbnUFLuwOoZW7JMkYs9o4+sPHJKmUgGgJXhhyDwGrV5TOZ zXpae3FclA0wWMYWzVZG0wiRcu+qIsRDzi9E9wlZs6Mb353QmbYcCLJP03gSVxq3eUtr AX2A== X-Gm-Message-State: AOAM532vJ7ESRvkSpgvbCq3N9dwxjOhsoz4HEtb+zWUNyNx9VRU9gi78 hx0E6yxOa0I12W4ce7+4MleREw== X-Received: by 2002:a5d:5709:: with SMTP id a9mr27851692wrv.707.1642582349895; Wed, 19 Jan 2022 00:52:29 -0800 (PST) Received: from ?IPv6:2001:861:44c0:66c0:d394:97d0:bc02:3846? ([2001:861:44c0:66c0:d394:97d0:bc02:3846]) by smtp.gmail.com with ESMTPSA id u12sm14189172wrm.106.2022.01.19.00.52.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Jan 2022 00:52:28 -0800 (PST) Subject: Re: [PATCH v2 3/4] irqchip/meson-gpio: add select trigger type callback To: Qianggui Song , Thomas Gleixner , Marc Zyngier Cc: Kevin Hilman , Jerome Brunet , Martin Blumenstingl , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org References: <20220119070809.15563-1-qianggui.song@amlogic.com> <20220119070809.15563-4-qianggui.song@amlogic.com> From: Neil Armstrong Organization: Baylibre Message-ID: Date: Wed, 19 Jan 2022 09:52:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20220119070809.15563-4-qianggui.song@amlogic.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 19/01/2022 08:08, Qianggui Song wrote: > Due to some chips may use different registers and offset, provide > a set trigger type call back. > > Signed-off-by: Qianggui Song > --- > drivers/irqchip/irq-meson-gpio.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/irqchip/irq-meson-gpio.c b/drivers/irqchip/irq-meson-gpio.c > index eefe15e1b3a6..b511f9532adc 100644 > --- a/drivers/irqchip/irq-meson-gpio.c > +++ b/drivers/irqchip/irq-meson-gpio.c > @@ -55,6 +55,8 @@ struct irq_ctl_ops { > void (*gpio_irq_sel_pin)(struct meson_gpio_irq_controller *ctl, > unsigned int channel, unsigned long hwirq); > void (*gpio_irq_init)(struct meson_gpio_irq_controller *ctl); > + void (*gpio_irq_sel_type)(struct meson_gpio_irq_controller *ctl, > + unsigned int idx, u32 val); > }; > > struct meson_gpio_irq_params { > @@ -278,6 +280,12 @@ static int meson_gpio_irq_type_setup(struct meson_gpio_irq_controller *ctl, > */ > type &= IRQ_TYPE_SENSE_MASK; > > + /* Some controllers may have different calculation method*/ > + if (params->ops.gpio_irq_sel_type) { > + params->ops.gpio_irq_sel_type(ctl, idx, type); > + return 0; > + } > + > /* > * New controller support EDGE_BOTH trigger. This setting takes > * precedence over the other edge/polarity settings > The comment on v1 hasn't been addresses here, it was asked to move the old controllers sel_type to a callback and introduce an S4 callback instead of doing this. Neil