Linux-Serial Archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Cc: Jiri Slaby <jirislaby@kernel.org>, Hugo Villeneuve <hugo@hugovil.com>
Subject: [PATCH v2 04/16] serial: max3100: Make struct plat_max3100 local
Date: Tue,  2 Apr 2024 22:50:31 +0300	[thread overview]
Message-ID: <20240402195306.269276-5-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20240402195306.269276-1-andriy.shevchenko@linux.intel.com>

There is no user of the struct plat_max3100 outside the driver.
Inline its contents into the driver. While at it, drop outdated
example in the comment.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/tty/serial/max3100.c   | 38 +++++++++++++--------------
 include/linux/serial_max3100.h | 48 ----------------------------------
 2 files changed, 18 insertions(+), 68 deletions(-)
 delete mode 100644 include/linux/serial_max3100.h

diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c
index 3d2b83d6ab51..031803a5da58 100644
--- a/drivers/tty/serial/max3100.c
+++ b/drivers/tty/serial/max3100.c
@@ -1,6 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
- *
  *  Copyright (C) 2008 Christian Pellegrin <chripell@evolware.org>
  *
  * Notes: the MAX3100 doesn't provide an interrupt on CTS so we have
@@ -8,24 +7,6 @@
  * writing conf clears FIFO buffer and we cannot have this interrupt
  * always asking us for attention.
  *
- * Example platform data:
-
- static struct plat_max3100 max3100_plat_data = {
- .loopback = 0,
- .crystal = 0,
- .poll_time = 100,
- };
-
- static struct spi_board_info spi_board_info[] = {
- {
- .modalias	= "max3100",
- .platform_data	= &max3100_plat_data,
- .irq		= IRQ_EINT12,
- .max_speed_hz	= 5*1000*1000,
- .chip_select	= 0,
- },
- };
-
  * The initial minor number is 209 in the low-density serial port:
  * mknod /dev/ttyMAX0 c 204 209
  */
@@ -49,7 +30,24 @@
 
 #include <asm/unaligned.h>
 
-#include <linux/serial_max3100.h>
+/**
+ * struct plat_max3100 - MAX3100 SPI UART platform data
+ * @loopback:            force MAX3100 in loopback
+ * @crystal:             1 for 3.6864 Mhz, 0 for 1.8432
+ * @max3100_hw_suspend:  MAX3100 has a shutdown pin. This is a hook
+ *                       called on suspend and resume to activate it.
+ * @poll_time:           poll time for CTS signal in ms, 0 disables (so no hw
+ *                       flow ctrl is possible but you have less CPU usage)
+ *
+ * You should use this structure in your machine description to specify
+ * how the MAX3100 is connected.
+ */
+struct plat_max3100 {
+	int loopback;
+	int crystal;
+	void (*max3100_hw_suspend) (int suspend);
+	int poll_time;
+};
 
 #define MAX3100_C    (1<<14)
 #define MAX3100_D    (0<<14)
diff --git a/include/linux/serial_max3100.h b/include/linux/serial_max3100.h
deleted file mode 100644
index befd55c08a7c..000000000000
--- a/include/linux/serial_max3100.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- *
- *  Copyright (C) 2007 Christian Pellegrin
- */
-
-
-#ifndef _LINUX_SERIAL_MAX3100_H
-#define _LINUX_SERIAL_MAX3100_H 1
-
-
-/**
- * struct plat_max3100 - MAX3100 SPI UART platform data
- * @loopback:            force MAX3100 in loopback
- * @crystal:             1 for 3.6864 Mhz, 0 for 1.8432
- * @max3100_hw_suspend:  MAX3100 has a shutdown pin. This is a hook
- *                       called on suspend and resume to activate it.
- * @poll_time:           poll time for CTS signal in ms, 0 disables (so no hw
- *                       flow ctrl is possible but you have less CPU usage)
- *
- * You should use this structure in your machine description to specify
- * how the MAX3100 is connected. Example:
- *
- * static struct plat_max3100 max3100_plat_data = {
- *  .loopback = 0,
- *  .crystal = 0,
- *  .poll_time = 100,
- * };
- *
- * static struct spi_board_info spi_board_info[] = {
- * {
- *  .modalias	= "max3100",
- *  .platform_data	= &max3100_plat_data,
- *  .irq		= IRQ_EINT12,
- *  .max_speed_hz	= 5*1000*1000,
- *  .chip_select	= 0,
- * },
- * };
- *
- **/
-struct plat_max3100 {
-	int loopback;
-	int crystal;
-	void (*max3100_hw_suspend) (int suspend);
-	int poll_time;
-};
-
-#endif
-- 
2.43.0.rc1.1.gbec44491f096


  parent reply	other threads:[~2024-04-02 19:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-02 19:50 [PATCH v2 00/16] serial: max3100: Put into shape Andy Shevchenko
2024-04-02 19:50 ` [PATCH v2 01/16] serial: max3100: Lock port->lock when calling uart_handle_cts_change() Andy Shevchenko
2024-04-02 19:50 ` [PATCH v2 02/16] serial: max3100: Update uart_driver_registered on driver removal Andy Shevchenko
2024-04-02 20:11   ` Hugo Villeneuve
2024-04-02 19:50 ` [PATCH v2 03/16] serial: max3100: Fix bitwise types Andy Shevchenko
2024-04-02 19:50 ` Andy Shevchenko [this message]
2024-04-02 19:50 ` [PATCH v2 05/16] serial: max3100: Remove custom HW shutdown support Andy Shevchenko
2024-04-02 19:50 ` [PATCH v2 06/16] serial: max3100: Replace custom polling timeout with standard one Andy Shevchenko
2024-04-02 19:50 ` [PATCH v2 07/16] serial: max3100: Enable TIOCM_LOOP Andy Shevchenko
2024-04-02 19:50 ` [PATCH v2 08/16] serial: max3100: Get crystal frequency via device property Andy Shevchenko
2024-04-02 19:50 ` [PATCH v2 09/16] serial: max3100: Remove duplicating irq field Andy Shevchenko
2024-04-02 19:50 ` [PATCH v2 10/16] serial: max3100: Switch to use dev_err_probe() Andy Shevchenko
2024-04-02 19:50 ` [PATCH v2 11/16] serial: max3100: Replace MODULE_ALIAS() with respective ID tables Andy Shevchenko
2024-04-02 19:50 ` [PATCH v2 12/16] serial: max3100: Switch to DEFINE_SIMPLE_DEV_PM_OPS() Andy Shevchenko
2024-04-02 19:50 ` [PATCH v2 13/16] serial: max3100: Extract to_max3100_port() helper macro Andy Shevchenko
2024-04-02 19:50 ` [PATCH v2 14/16] serial: max3100: Remove unneeded forward declaration Andy Shevchenko
2024-04-02 19:50 ` [PATCH v2 15/16] serial: max3100: Sort headers Andy Shevchenko
2024-04-02 19:50 ` [PATCH v2 16/16] serial: max3100: Update Kconfig entry Andy Shevchenko
2024-04-09 13:52 ` [PATCH v2 00/16] serial: max3100: Put into shape Greg Kroah-Hartman
2024-04-09 13:55   ` Andy Shevchenko
2024-04-09 14:48     ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240402195306.269276-5-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hugo@hugovil.com \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).