Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4656121yba; Wed, 10 Apr 2019 02:01:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHD/EJDJAS0LXyY11d2GlB2LeqWR6JZqPY+hrCnM718IQzxPlZp8x4faOAh5IQFFu3IS1s X-Received: by 2002:a62:174c:: with SMTP id 73mr42173830pfx.33.1554886901321; Wed, 10 Apr 2019 02:01:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554886901; cv=none; d=google.com; s=arc-20160816; b=Xu3lmTKu2KjWVXJfJc7shHnNqLcckOG6N4iGQ0d0tsLxfv4NmeFv1XuRelQBAdBmpt lfrGNA1+6hnEx+mgAmQ8qhjbEnlQa0y0CaepQ9uio5ucJDns9YNDROvHMxy12iJVSE4d /0ChrHVEJBjQVtBiSWkLoW/mhQ4MAMXLKEwnGFGVNwvd5aLUCSfEKVFZu7OgbtEu2HBI KU5Q6LyYVd5eytPscrRRO4+uILr47D5aKubd+i+qtoiFRjcgG5dp1Rm2n1cjWrkqjMTl ujJRRcq9RefgVTet8gT5HC7M1TXZl3i4s7eZYKSDCuGZTAbcisiTL38K3hPTYlOyoM7T qG6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Uev6GfIIr9rB4PNVkNyQw3ZWFu+rTdXHhhMiGWjxX5A=; b=0XHplxJN2iNqEbr4TaVEnMrHzThS+bqWPKbsRuc821lUtlzD43GQXtQQsXNYBCla1g E93J0UVf17yseWjC4OYzmKT9Rdc/YOO+g2V1JtsmRLomgUYIOw+sH2qK7By7uxUTOFaF m65s9BYOhjPCZOMtRvJ9uWvRxU7dBrFIQRUUAiYKrnOLDktMPuu87TRXBTSM/sZpP2g8 +z1qgq7vlkqtsEjDnLzWGO4UgWVN/FmQ9agemriLhmLqEXro2JqTEG05QnxiNYTUvJ9Q 3oZ9axKMcdj6q55lGmTC4Kz3D8D49QiI88DVTaQZQp+b5NdPfSFtPGyzQp2Cu7JHQURG +4RQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x8si32442685pgx.484.2019.04.10.02.01.24; Wed, 10 Apr 2019 02:01:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728057AbfDJHzd (ORCPT + 99 others); Wed, 10 Apr 2019 03:55:33 -0400 Received: from mga04.intel.com ([192.55.52.120]:39234 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726667AbfDJHzc (ORCPT ); Wed, 10 Apr 2019 03:55:32 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2019 00:55:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,332,1549958400"; d="scan'208";a="160335374" Received: from mylly.fi.intel.com (HELO [10.237.72.159]) ([10.237.72.159]) by fmsmga004.fm.intel.com with ESMTP; 10 Apr 2019 00:55:30 -0700 Subject: Re: [PATCH 1/1] spi: pxa2xx: add driver enabling message To: Flavio Suligoi , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Mark Brown Cc: "linux-arm-kernel@lists.infradead.org" , "linux-spi@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <1554736964-6058-1-git-send-email-f.suligoi@asem.it> <51e9e073-625d-f5c0-6b2e-410f6ddb6346@linux.intel.com> <6cef52a73fb547bb9c0dd84efca8f7f8@asem.it> From: Jarkko Nikula Message-ID: <2c853342-f937-30e6-ce6f-010e06f7376c@linux.intel.com> Date: Wed, 10 Apr 2019 10:55:29 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <6cef52a73fb547bb9c0dd84efca8f7f8@asem.it> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/9/19 5:11 PM, Flavio Suligoi wrote: > Hi Jarkko, > >> Hi >> >> On 4/8/19 6:22 PM, Flavio Suligoi wrote: >>> Add an info message for the PXA2xx device driver start-up, >>> with the indication of the transfer mode used (DMA or GPIO). >>> >>> This info is useful to individuate the timing when >>> the module starts. >>> >>> Signed-off-by: Flavio Suligoi >>> --- >>> drivers/spi/spi-pxa2xx.c | 3 +++ >>> 1 file changed, 3 insertions(+) >>> >>> diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c >>> index f7068cc..d449501 100644 >>> --- a/drivers/spi/spi-pxa2xx.c >>> +++ b/drivers/spi/spi-pxa2xx.c >>> @@ -1826,6 +1826,9 @@ static int pxa2xx_spi_probe(struct platform_device >> *pdev) >>> goto out_error_clock_enabled; >>> } >>> >>> + dev_info(dev, "PXA2xx SPI master controller (%s mode)\n", >>> + platform_info->enable_dma ? "DMA" : "PIO"); >>> + >>> return status; >>> >> Would this look better if moved before devm_spi_register_controller() >> call? > > Ok, so in case of SPI registering failure, we have two messages, as: > > pxa2xx-spi 80860F0E:00: PXA2xx SPI master controller (DMA mode) > pxa2xx-spi 80860F0E:00: problem registering spi controller > > Do you think that it is more explicative? > I think yes and it should not cause confusion since the error message is the last one. I was thinking the successful registration case when DMA is not available. First there is a warning, followed by a debug message from SPI core (if CONFIG_SPI_DEBUG) and then info message. [ 9.506895] pxa2xx-spi pxa2xx-spi.13: no DMA channels available, using PIO [ 9.516770] pxa2xx-spi pxa2xx-spi.13: registered master spi2 [ 9.518527] pxa2xx-spi pxa2xx-spi.13: PXA2xx SPI master controller (PIO mode) Actually this info message doesn't necessarily tell will the driver end up using DMA for transfers. See pxa2xx_spi_can_dma() and pxa2xx_spi_transfer_one(). How about replacing "no DMA channels available, using PIO" and have instead single info message telling is the DMA available or does the driver use PIO only? -- Jarkko