From mboxrd@z Thu Jan 1 00:00:00 1970 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 56545C433EF for ; Tue, 19 Apr 2022 17:11:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231651AbiDSROc (ORCPT ); Tue, 19 Apr 2022 13:14:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244868AbiDSRNn (ORCPT ); Tue, 19 Apr 2022 13:13:43 -0400 Received: from aposti.net (aposti.net [89.234.176.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 080C33465F; Tue, 19 Apr 2022 10:11:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1650388258; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+jHHqMT3ZNJyXA6M3ybRSFsTHCa1a0GBz5I5GGvIb6E=; b=dx2HRl6oBoNgzvk39RvHvRVwUZSRIH5DOFtd4lqBrWOJ0j5jkENLlVzLcxN7Xx3y2Sk6Nf cTEn5cHY9n4ZoqGGx0nZYRRsUV39x04Iur3rItBvLzcWsst7tZ2YWQYbCFTwoQL0bI2TQC JbhHjo3PXhenPiPPYkhDlIBQLmF5skg= Date: Tue, 19 Apr 2022 18:10:47 +0100 From: Paul Cercueil Subject: Re: [PATCH 1/3] SPI: Ingenic: Add support for use GPIO as chip select line. To: Mark Brown Cc: Zhou Yanjie , robh+dt@kernel.org, krzk+dt@kernel.org, linux-spi@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, contact@artur-rojek.eu, dongsheng.qiu@ingenic.com, aric.pzqi@ingenic.com, rick.tyliu@ingenic.com, sernia.zhou@foxmail.com, zhenwenjin@gmail.com, reimu@sudomaker.com Message-Id: In-Reply-To: References: <1650032528-118220-1-git-send-email-zhouyanjie@wanyeetech.com> <1650032528-118220-2-git-send-email-zhouyanjie@wanyeetech.com> <61ZDAR.SD20HFTWMIBH3@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Le mar., avril 19 2022 at 18:00:41 +0100, Mark Brown=20 a =C3=A9crit : > On Sat, Apr 16, 2022 at 05:36:46PM +0100, Paul Cercueil wrote: >> Le sam., avril 16 2022 at 19:55:13 +0800, Zhou Yanjie >> > On 2022/4/15 =E4=B8=8B=E5=8D=8811:00, Paul Cercueil wrote: >=20 >> > > > - ctlr->num_chipselect =3D 2; >> > > > + ctlr->use_gpio_descriptors =3D true; >=20 >> > > I wonder if this should be set conditionally instead. Maybe set=20 >> it >> > > to =7F"true" if the "num-cs" property exists? >=20 >> > I'm not too sure, but it seems some other drivers like=20 >> "spi-sun6i.c", >> > "spi-stm32.c", "spi-s3c64xx.c", "spi-pic32.c", etc. set it >> > unconditionally. >=20 >> Ok, maybe Mark can enlighten us here. >=20 > use_gpio_descriptions is just selecting which version of the GPIO APIs > we should use if we're handling GPIOs rather than if we should handle > them. We've got one last driver using the numerical GPIO APIs, once > that one is converted we should just be able to drop the flag since > everything will be using descriptors. Thank you Mark. Cheers, -Paul