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 985EFEB64D8 for ; Wed, 21 Jun 2023 12:26:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231708AbjFUM0D (ORCPT ); Wed, 21 Jun 2023 08:26:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230428AbjFUM0C (ORCPT ); Wed, 21 Jun 2023 08:26:02 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22AF61712 for ; Wed, 21 Jun 2023 05:26:01 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-51bdc87feb1so718941a12.3 for ; Wed, 21 Jun 2023 05:26:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687350359; x=1689942359; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=EGk3oqjnNfHNIndAjqYr6Ubn4S+JmM/i7wpQCzmK7X0=; b=TDon5/PIbqBy/Ab2NWNtGLR3goBGa2sjDUeYrPM6Y0qhvkUsZvHTyLzdA/WDGtECes yCyjL6jjAvC/LjB/kFAJbwnMCoROQcEmZv/prrMeRcx/BZURkbsd9ZYDnDCXBSeYWbPJ r8V/n3ZyWu1A3YIzyLV0o/J+vc6eCC5hsrSuAAa4zgz3MF9LSPoBeiVvvXF24X2f1FNU 49mfSD2inLZwX78ar8Vj1WVxTJj2Q3PX/tSUU3KVHqKuyv6/JtF7+AfsVUoRYDaEhDO+ KH/J2H9HaRckvJSHXcNT/s7OCtkSrwZCeztjPTFrk1Ao6ebmI1/5gDGB2pY356aEyUSA 4tFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687350359; x=1689942359; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EGk3oqjnNfHNIndAjqYr6Ubn4S+JmM/i7wpQCzmK7X0=; b=PPl/y5eHZujHvTNsw06b/VFZbrqwhoQI6j0FKw34JR8OFWSP+9+o+lQootPY2KPasU avVqzi6r84WmFpL36xBbfcbh/3+CU1mXLOU1brk/+QuRw4hUxHKZzGazWH5SP5Vh9XjR iLydB2m6hQOYooW1jAEphlRQ9AR4sdwCTamfGBZLan7nBos9fxBaEek+Rcr1hjB6zGnm zl5ipgb3lvBfaQTJAfmg3fqVrw5ZP9I0+Tv0iG47ZNG5ZcL0WtWv+zuVpiLV7hgldzx0 9LrW/EYjbS0BS0dtqE5YKqcid3Ewl8V0CzRTDP/bVyayrDBEX0G6o7/DwcbrTyZBKOGs OdNg== X-Gm-Message-State: AC+VfDzS/kr9omEz/qQjC/hZ5jxYkyBVn5GQTPl3+tBrGWXa+RbuM1a+ qieCoxEwMw1gdHQc7CGHUNJZNQ== X-Google-Smtp-Source: ACHHUZ45ul/F6dXXQy/jtZVfcMApc1r5PDXrdq2EaA1pSCoE6yOWuKq1vxIO7aPtxItfkHTVcxfmOQ== X-Received: by 2002:a05:6402:2cd:b0:51a:2125:74d5 with SMTP id b13-20020a05640202cd00b0051a212574d5mr10619396edx.20.1687350359644; Wed, 21 Jun 2023 05:25:59 -0700 (PDT) Received: from [192.168.1.20] ([178.197.219.26]) by smtp.gmail.com with ESMTPSA id k22-20020a056402049600b0051bc58b8dbcsm2512156edv.59.2023.06.21.05.25.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 21 Jun 2023 05:25:59 -0700 (PDT) Message-ID: <29666c1f-c670-b38c-8555-e606771b480b@linaro.org> Date: Wed, 21 Jun 2023 14:25:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH 1/2] spi: stm32: disable device mode with st,stm32f4-spi compatible Content-Language: en-US To: Valentin Caron , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Alexandre Torgue , Alain Volmat , linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20230621115523.923176-1-valentin.caron@foss.st.com> <20230621115523.923176-2-valentin.caron@foss.st.com> From: Krzysztof Kozlowski In-Reply-To: <20230621115523.923176-2-valentin.caron@foss.st.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 21/06/2023 13:55, Valentin Caron wrote: > STM32 SPI driver is not capable to handle device mode with stm32f4/f7 soc. > Stop probing if this case happens. > > Signed-off-by: Valentin Caron ... > > static const struct of_device_id stm32_spi_of_match[] = { > @@ -1798,8 +1802,15 @@ static int stm32_spi_probe(struct platform_device *pdev) > struct device_node *np = pdev->dev.of_node; > bool device_mode; > int ret; > + const struct of_device_id *of_match = > + of_match_device(pdev->dev.driver->of_match_table, &pdev->dev); > + const struct stm32_spi_cfg *cfg = (const struct stm32_spi_cfg *)of_match->data; It seems you open-coded of_device_get_match_data(). Best regards, Krzysztof