Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp714981pxb; Fri, 14 Jan 2022 14:49:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJyDSVmturzR8JZ+GxgQLGzucGIImhCi3wfkZKrFIW/sDraxBzI/RYPTULaKAjD0PDir8VZo X-Received: by 2002:a17:906:8557:: with SMTP id h23mr7413657ejy.451.1642200557646; Fri, 14 Jan 2022 14:49:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642200557; cv=none; d=google.com; s=arc-20160816; b=NBQWtY0JBBr5aQLSOfu7tVq0diaIlfIWvewD0KVELhKq6akdH93ZmFhyr5ZzSls7kV ytZ4JYqStxJwddM4KTzoTgC+x/RbxWtbd8iUU74TeDBvqgl/nKom9FwtucbCU1q6uavE MuiZ0ItruvYahohA3bem2qvVyvIXavTEerQsrYP8RU6bikVNbVqHJnWKhGeuKnWSqW9d 6LvXZ7VdBFqSZWXR9tdoXys02s8R76mszHNCigo2xY47j0N7hqB9R4VqIK93mM7sMVGb wnNiP1wA0BYFQ72tx+l3fz9Pnc7DFDRnoga2DHTTneRYtQiOhHv2ttuGG8Lyt85oWmWs j+CQ== 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=Qxkpv3eNiRdJcWaLuANiCoD4pI3qvbrsDdQYc45dZk8=; b=lkbmIL1v4ttib17wDKTMM4LPru5BMg3EyokuDfaKhX2BOOOTBjyqNTiIoyNgnuov/w UyBitMhSs78f+Y/Mo6Y07GjYEobgtJy4+wkiW5CaLQwfdXKGbdcnAEnn/+WkG+8jGJ+3 x9bH2QHpbk2Z85btPgiYfUCQV5h+g13023OUgwofWtNdivyXeyxu/K+WVFKmRxfx9NKa EMXDVuFFhrvZFGsEOP9g4nCi9d0NVsRjJyKhQle+8zOhCKasZUrhPfhcOwoDnxAS68/+ waARn3ozx23RNgFzfYR3mal+2TxuTAOxFZbVLG/UUsoI6RX+kzTE4oCN1XDxEvwtWq/T H/Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=goCpoT6i; 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 gb22si3442601ejc.332.2022.01.14.14.48.53; Fri, 14 Jan 2022 14:49:17 -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=@linaro.org header.s=google header.b=goCpoT6i; 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 S243207AbiANQNs (ORCPT + 99 others); Fri, 14 Jan 2022 11:13:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243192AbiANQNk (ORCPT ); Fri, 14 Jan 2022 11:13:40 -0500 Received: from mail-ua1-x92b.google.com (mail-ua1-x92b.google.com [IPv6:2607:f8b0:4864:20::92b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8459C061401 for ; Fri, 14 Jan 2022 08:13:39 -0800 (PST) Received: by mail-ua1-x92b.google.com with SMTP id p37so17723184uae.8 for ; Fri, 14 Jan 2022 08:13:39 -0800 (PST) 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=Qxkpv3eNiRdJcWaLuANiCoD4pI3qvbrsDdQYc45dZk8=; b=goCpoT6iIjZHX/StCqxQby/LS7loOLRpEO/Y1+Fj6M2kXs38lG7f13W8ikbjrmBMCB OnFyQXUuaTcCidVWULOBJLIvx/O/tI14Z/F4AqdGWKvBoErCdpyWjtBMdyDgcX26Jfur P7tevqaqFwc2lNh+GQupHifgTHk1QgJ0IulZyqJpHw93YdOpRSB30jRvKA//YtZrz3uy /rLzNvL+AP0sqJ3Gw46gtEEyJHSgy+hlpmuz9XhnzfG6TSHUx8NMiint7b7kMzgahLzi uyYTcPOibvNGpK23+DpgqR2j4PPmT16QhZWV9UBCLL4NKQuKJeBHXJ6hFknVvbMD9Vjx Z9Sg== 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=Qxkpv3eNiRdJcWaLuANiCoD4pI3qvbrsDdQYc45dZk8=; b=7BrkpkTVPG32sALpxAFxklHy6Udmw3VRUex+DivnN+km1pxKaCzfr1Lbe0/NYBzuva dQ6N5+vadlQF0YKGvAI6l+eJbvewz/eZZ0zNfg1wrgH7QW1s2AV95ApjvbZ2kyulHsPV cb0cw08tVI88hTlnNHsKAaIu80KX52aBf5OWr0rk4m4W+t+lHdqq6bxPWcUdy7Jy0Xgh C/we/qHCr1ASxyCataWqqCTdYGWSvGJ6klrL7kIxUndUUWj5aZBmi1vRt4vlUMLXNQUG C/vDonanbKJW9Cq5qZZXnWFnIutz89PWNJO/+7a82/P+5CtiDzomXPuptYSapn7684Zc HYaA== X-Gm-Message-State: AOAM53390UZg/oAIHP4ThOiYJpOC7CU7hqAP/1uLzJe+ULeHgABU8DqG h/2J67iPS6vWKTVMSJkq12z1+I0cobLo47AlisdubA== X-Received: by 2002:ab0:13ee:: with SMTP id n43mr4421442uae.9.1642176818829; Fri, 14 Jan 2022 08:13:38 -0800 (PST) MIME-Version: 1.0 References: <20220112100046.68068-1-krzysztof.kozlowski@canonical.com> <20220112100046.68068-5-krzysztof.kozlowski@canonical.com> In-Reply-To: <20220112100046.68068-5-krzysztof.kozlowski@canonical.com> From: Sam Protsenko Date: Fri, 14 Jan 2022 18:13:27 +0200 Message-ID: Subject: Re: [PATCH v3 4/4] spi: s3c64xx: allow controller-data to be optional To: Krzysztof Kozlowski Cc: Andi Shyti , Mark Brown , Rob Herring , Pratyush Yadav , linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Herring Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 12 Jan 2022 at 12:00, Krzysztof Kozlowski wrote: > > The Samsung SoC SPI driver requires to provide controller-data node > for each of SPI peripheral device nodes. Make this controller-data node > optional, so DTS could be simpler. > > Suggested-by: Rob Herring > Signed-off-by: Krzysztof Kozlowski > --- Reviewed-by: Sam Protsenko > drivers/spi/spi-s3c64xx.c | 14 ++++++-------- > 1 file changed, 6 insertions(+), 8 deletions(-) > > diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c > index 8755cd85e83c..769d958a2f86 100644 > --- a/drivers/spi/spi-s3c64xx.c > +++ b/drivers/spi/spi-s3c64xx.c > @@ -796,16 +796,14 @@ static struct s3c64xx_spi_csinfo *s3c64xx_get_slave_ctrldata( > return ERR_PTR(-EINVAL); > } > > - data_np = of_get_child_by_name(slave_np, "controller-data"); > - if (!data_np) { > - dev_err(&spi->dev, "child node 'controller-data' not found\n"); > - return ERR_PTR(-EINVAL); > - } > - > cs = kzalloc(sizeof(*cs), GFP_KERNEL); > - if (!cs) { > - of_node_put(data_np); > + if (!cs) > return ERR_PTR(-ENOMEM); > + > + data_np = of_get_child_by_name(slave_np, "controller-data"); > + if (!data_np) { > + dev_info(&spi->dev, "child node 'controller-data' not found, using defaults\n"); > + return cs; > } > > of_property_read_u32(data_np, "samsung,spi-feedback-delay", &fb_delay); > -- > 2.32.0 >