Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp12505pxb; Fri, 15 Jan 2021 04:39:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjWlipq1d7avBVPCqkaBdce7fjI+RXh4CfTbEw7LIrbnkIN5LWaoNBCI8CJx03ETdWGdhl X-Received: by 2002:a05:6402:2288:: with SMTP id cw8mr4669003edb.161.1610714384412; Fri, 15 Jan 2021 04:39:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610714384; cv=none; d=google.com; s=arc-20160816; b=H9AOcPvSe1EsqGaR16naJ8gBJLsU63E3fKH4W0rKdHWxMSOU4JIRMD9J03Cz149b9t +z2EeXshwMRIT/rOSzJu5GGSb55AzJzlGg3wGziJKoyS7t1f2Hnu2FN7kgc6Egj5w/hO aIhfynxaux8EJjeMIB9iHE2Qc4o4aAjCz2vILpE7UyL39WQnrP9EO01ebBAgLTPOrNuO 9ZEe+jqgXqhpROpSwWDDgoHxasedNw0qebHwQyrrH7Rr6CSGqcUbXFYfBKl1C6J4wuTr rSpQrDqY56y86W9c4mVU1vwfBi0iHGnWymYzmW2/cAxKaq3ED6zLRTqCjlJAG0nfdIOv Cn+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qu1yjUnIXWqJaqCQ4GcQgQLBuiAAJ1UjqXO2SVPGGRQ=; b=xQernqf3AC/BRKavHeJVBaZI+hN9QA7NrrMe1jsYOZ9TtZDx1NsSiRbulAcL6ZFaFS weMXLW3iC2bFqJ9iWAWNfaUg2ZJX613j8TG8Xu+eAGOFJitsl8JxTah21W4xnGFTNzS2 CpZKs0EJZSMDSnBhnxmWyImugpviox0JZrdd9xjKdz6Ps404e7CnBAu5uScycZhJ1R3v CDMguAaf85D1krEX46Vb8wz0DOXeEsrRP8mPTTG3/x9Zf2CmoXUWeOV8KgJF7KVTam/u fj8+UQoPnnCZRaWDjbjUulNRScMryaD+QZ0ICjoQvncGB+U8Lyq2SsX6aKO96MK/JRcr GBQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gZNHNU7E; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p17si3706063ejw.23.2021.01.15.04.39.20; Fri, 15 Jan 2021 04:39:44 -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=@linuxfoundation.org header.s=korg header.b=gZNHNU7E; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387693AbhAOMfb (ORCPT + 99 others); Fri, 15 Jan 2021 07:35:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:42316 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732956AbhAOMfT (ORCPT ); Fri, 15 Jan 2021 07:35:19 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4F66E23356; Fri, 15 Jan 2021 12:34:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610714078; bh=xxXoBY5nHnpv7/2YhjLVgSeywH1zqfCy2mWXgAox8TA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gZNHNU7EMC4ccrtqpBbB+qBWZTxNxuCelvZ5/U/9GRBSunsRJwYQPlnIwSFEAliYe hdIDgLpmWxNElhZtiZYLzXGipQBS0NDaw6qkKhTS7JJy37aq3GWkQeRUnz8P5msejy HvzIKErFTFRKPbUVF5gW/ykXrTndz5keJLo1D0eg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Murphy , Sean Nyekjaer , Marc Kleine-Budde Subject: [PATCH 5.4 36/62] can: tcan4x5x: fix bittiming const, use common bittiming from m_can driver Date: Fri, 15 Jan 2021 13:27:58 +0100 Message-Id: <20210115122000.140930399@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210115121958.391610178@linuxfoundation.org> References: <20210115121958.391610178@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marc Kleine-Budde commit aee2b3ccc8a63d1cd7da6a8a153d1f3712d40826 upstream. According to the TCAN4550 datasheet "SLLSF91 - DECEMBER 2018" the tcan4x5x has the same bittiming constants as a m_can revision 3.2.x/3.3.0. The tcan4x5x chip I'm using identifies itself as m_can revision 3.2.1, so remove the tcan4x5x specific bittiming values and rely on the values in the m_can driver, which are selected according to core revision. Fixes: 5443c226ba91 ("can: tcan4x5x: Add tcan4x5x driver to the kernel") Cc: Dan Murphy Reviewed-by: Sean Nyekjaer Link: https://lore.kernel.org/r/20201215103238.524029-3-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde Signed-off-by: Greg Kroah-Hartman --- drivers/net/can/m_can/tcan4x5x.c | 26 -------------------------- 1 file changed, 26 deletions(-) --- a/drivers/net/can/m_can/tcan4x5x.c +++ b/drivers/net/can/m_can/tcan4x5x.c @@ -126,30 +126,6 @@ struct tcan4x5x_priv { int reg_offset; }; -static struct can_bittiming_const tcan4x5x_bittiming_const = { - .name = DEVICE_NAME, - .tseg1_min = 2, - .tseg1_max = 31, - .tseg2_min = 2, - .tseg2_max = 16, - .sjw_max = 16, - .brp_min = 1, - .brp_max = 32, - .brp_inc = 1, -}; - -static struct can_bittiming_const tcan4x5x_data_bittiming_const = { - .name = DEVICE_NAME, - .tseg1_min = 1, - .tseg1_max = 32, - .tseg2_min = 1, - .tseg2_max = 16, - .sjw_max = 16, - .brp_min = 1, - .brp_max = 32, - .brp_inc = 1, -}; - static void tcan4x5x_check_wake(struct tcan4x5x_priv *priv) { int wake_state = 0; @@ -449,8 +425,6 @@ static int tcan4x5x_can_probe(struct spi mcan_class->dev = &spi->dev; mcan_class->ops = &tcan4x5x_ops; mcan_class->is_peripheral = true; - mcan_class->bit_timing = &tcan4x5x_bittiming_const; - mcan_class->data_timing = &tcan4x5x_data_bittiming_const; mcan_class->net->irq = spi->irq; spi_set_drvdata(spi, priv);