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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BAE5FEB64DA for ; Wed, 5 Jul 2023 17:17:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:CC:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7vkgEC2Mx20s0hh9s+uylHk+L/aE5wEiee55uS3r6XA=; b=kHQTgTAtt2r1QY 19ZdmZjnA9yCdad6hTJLttYsvfcfs7K8vMjrmSCWiuUpQpW1nooPLLyzkVtHgeWiHgflr2nAeHElA TQ6X7Wzdt9VnW7vJJsInObydFE20WOl0stRi7SmVRV0t0Bx0R8RB+b0qcGKhnN3XtC6wL6w6ZxG38 mbvUOgkM7VpUxMjiPL9SICQ1F0kz5MSaf4DiFkaop796lMzGgwewq/TaF96ThVfC2WfGeoWWgLn/K wxxtTXUMfKgQnFZHxjnhHD+NztA1lLo5kiDqBPEOU6tt6FNAccqMLMzDvmpc2eTxXnm5oCeYq8Kcw 4AtLilK4tFWZxPa0XnAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qH67D-00GaIf-07; Wed, 05 Jul 2023 17:16:31 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qH679-00GaI8-1J for linux-arm-kernel@lists.infradead.org; Wed, 05 Jul 2023 17:16:29 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 365Fgupx003052; Wed, 5 Jul 2023 19:16:19 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=gGj1Dt59rSJT83vctVPmKjU0cUWyk4vuQ+qAY3jlC0c=; b=Yn4+vjqDron9kSm/b6nn+ZJOvsJCQ9VvAcn5MPryAC9quwIf5e2Pa7FvsSqyj+9X09Em wkeVJhoyUl+2BK+/4JNRY91aeCqOWuiAkEOtGxODgYj/+9OUe8w20bpjiLlV22wUMZJL YZBklYzrRcD/55tFetLtmWMklboVwTfJacbMvj0EhQoazTs/VxVcMs7HZ9Oh4qupJhQV Hyqx7yM2feffQdPpbmfwBc/R0guYM5huN2JAh11O2Rvk3IF5moz7C6rppEQLOBrp6eXu 8PU0cRzewng9Ie5t6KTXzcbfDBHaODqGGVrxCuITVdFyZn1MnfpqoK0JFMoGuGqFaczS gA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3rn8c9t0kn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Jul 2023 19:16:19 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 40A76100060; Wed, 5 Jul 2023 19:16:17 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 263E324B89D; Wed, 5 Jul 2023 19:16:17 +0200 (CEST) Received: from [10.201.20.168] (10.201.20.168) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 5 Jul 2023 19:16:16 +0200 Message-ID: Date: Wed, 5 Jul 2023 19:16:16 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v2] spi: stm32: disable device mode with st,stm32f4-spi compatible Content-Language: en-US To: Krzysztof Kozlowski , Mark Brown CC: Krzysztof Kozlowski , Alexandre Torgue , Alain Volmat , , , , References: <20230627123906.147029-1-valentin.caron@foss.st.com> <0815474b-a8fa-f486-fc6e-a85df88ed9b9@linaro.org> <79505e19-c5ee-36ee-c8ae-344c15f8b108@linaro.org> From: Valentin CARON In-Reply-To: <79505e19-c5ee-36ee-c8ae-344c15f8b108@linaro.org> X-Originating-IP: [10.201.20.168] X-ClientProxiedBy: SHFCAS1NODE2.st.com (10.75.129.73) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-05_08,2023-07-05_01,2023-05-22_02 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230705_101627_962340_B1064F48 X-CRM114-Status: GOOD ( 18.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, Krzysztof On 7/1/23 10:09, Krzysztof Kozlowski wrote: > On 28/06/2023 18:21, Valentin CARON wrote: >> Hi, >> >> On 6/27/23 15:39, Krzysztof Kozlowski wrote: >>> On 27/06/2023 14:39, Valentin Caron wrote: >>>> STM32 SPI driver is not capable to handle device mode with stm32f4 soc. >>>> Stop probing if this case happens, and print an error with involved >>>> compatible. >>>> >>> ... >>> >>>> >>>> static const struct of_device_id stm32_spi_of_match[] = { >>>> @@ -1798,8 +1802,16 @@ static int stm32_spi_probe(struct platform_device *pdev) >>>> struct device_node *np = pdev->dev.of_node; >>>> bool device_mode; >>>> int ret; >>>> + const char *compatible = >>>> + of_match_device(pdev->dev.driver->of_match_table, &pdev->dev)->compatible; >>> The goal was to replace it, so drop it. >> Is is still needed for dev_err, so I can't > Why do you need it for dev_err? Isn't it entirely redundant? > > Best regards, > Krzysztof > Only to have a clearer error message. To let know to user that spi device is not available on this device. Right now, there is only one compatible where spi device can't be enable. So I could use a static message. But this is not the best if a new compatible is added. Regards, Valentin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel