linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/3] auxdisplay: Introduce ht16k33 driver
@ 2016-05-18 12:23 Robin van der Gracht
  2016-05-18 12:23 ` [PATCH v6 1/3] of: add vendor prefix for Holtek Semiconductor Robin van der Gracht
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Robin van der Gracht @ 2016-05-18 12:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Miguel Ojeda Sandonis, Thierry Reding, Shawn Guo,
	Jonathan Cameron, Matt Ranostay, Andrew Morton, David S . Miller,
	Greg Kroah-Hartman, Kalle Valo, Mauro Carvalho Chehab,
	Guenter Roeck, Jiri Slaby, devicetree, Robin van der Gracht

This patchset adds a new driver to the auxdisplay subsystem. It also adds
devicetree bindings documentation and a new vendor prefix.

I added myself as maintainer to the MAINTAINERS file.

Robin van der Gracht (3):
  of: add vendor prefix for Holtek Semiconductor
  auxdisplay: ht16k33: Driver for LED controller
  MAINTAINERS: auxdisplay: Added myself as maintainer for ht16k33 driver

 .../devicetree/bindings/display/ht16k33.txt        |  42 ++
 .../devicetree/bindings/vendor-prefixes.txt        |   1 +
 MAINTAINERS                                        |   6 +
 drivers/auxdisplay/Kconfig                         |   9 +
 drivers/auxdisplay/Makefile                        |   1 +
 drivers/auxdisplay/ht16k33.c                       | 563 +++++++++++++++++++++
 6 files changed, 622 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/ht16k33.txt
 create mode 100644 drivers/auxdisplay/ht16k33.c

-- 
2.7.4

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v6 1/3] of: add vendor prefix for Holtek Semiconductor
  2016-05-18 12:23 [PATCH v6 0/3] auxdisplay: Introduce ht16k33 driver Robin van der Gracht
@ 2016-05-18 12:23 ` Robin van der Gracht
  2016-05-18 23:17   ` Rob Herring
  2016-05-18 12:23 ` [PATCH v6 2/3] auxdisplay: ht16k33: Driver for LED controller Robin van der Gracht
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 15+ messages in thread
From: Robin van der Gracht @ 2016-05-18 12:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Miguel Ojeda Sandonis, Thierry Reding, Shawn Guo,
	Jonathan Cameron, Matt Ranostay, Andrew Morton, David S . Miller,
	Greg Kroah-Hartman, Kalle Valo, Mauro Carvalho Chehab,
	Guenter Roeck, Jiri Slaby, devicetree, Robin van der Gracht

Signed-off-by: Robin van der Gracht <robin@protonic.nl>
---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 86740d4..84fb85d 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -112,6 +112,7 @@ hitex	Hitex Development Tools
 holt	Holt Integrated Circuits, Inc.
 honeywell	Honeywell
 hp	Hewlett Packard
+holtek	Holtek Semiconductor, Inc.
 i2se	I2SE GmbH
 ibm	International Business Machines (IBM)
 idt	Integrated Device Technologies, Inc.
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v6 2/3] auxdisplay: ht16k33: Driver for LED controller
  2016-05-18 12:23 [PATCH v6 0/3] auxdisplay: Introduce ht16k33 driver Robin van der Gracht
  2016-05-18 12:23 ` [PATCH v6 1/3] of: add vendor prefix for Holtek Semiconductor Robin van der Gracht
@ 2016-05-18 12:23 ` Robin van der Gracht
  2016-05-18 23:23   ` Rob Herring
  2016-05-18 12:23 ` [PATCH v6 3/3] MAINTAINERS: auxdisplay: Added myself as maintainer for ht16k33 driver Robin van der Gracht
  2016-05-18 15:09 ` [PATCH v6 0/3] auxdisplay: Introduce " Greg Kroah-Hartman
  3 siblings, 1 reply; 15+ messages in thread
From: Robin van der Gracht @ 2016-05-18 12:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Miguel Ojeda Sandonis, Thierry Reding, Shawn Guo,
	Jonathan Cameron, Matt Ranostay, Andrew Morton, David S . Miller,
	Greg Kroah-Hartman, Kalle Valo, Mauro Carvalho Chehab,
	Guenter Roeck, Jiri Slaby, devicetree, Robin van der Gracht

Added a driver for the Holtek HT16K33 LED controller with keyscan.

Signed-off-by: Robin van der Gracht <robin@protonic.nl>
---
Changes in v6:
    - Fixed minor typo in documentation 'KEY_F0' -> 'KEY_F10'

 .../devicetree/bindings/display/ht16k33.txt        |  42 ++
 drivers/auxdisplay/Kconfig                         |   9 +
 drivers/auxdisplay/Makefile                        |   1 +
 drivers/auxdisplay/ht16k33.c                       | 563 +++++++++++++++++++++
 4 files changed, 615 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/ht16k33.txt
 create mode 100644 drivers/auxdisplay/ht16k33.c

diff --git a/Documentation/devicetree/bindings/display/ht16k33.txt b/Documentation/devicetree/bindings/display/ht16k33.txt
new file mode 100644
index 0000000..5c11320
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/ht16k33.txt
@@ -0,0 +1,42 @@
+Holtek ht16k33 RAM mapping 16*8 LED controller driver with keyscan
+-------------------------------------------------------------------------------
+
+Required properties:
+- compatible:		"holtek,ht16k33"
+- reg:			I2C slave address of the chip.
+- interrupt-parent:	A phandle pointing to the interrupt controller
+			serving the interrupt for this chip.
+- interrupts:		Interrupt specification for the key pressed interrupt.
+- refresh-rate-hz:	Display update interval in HZ.
+- debounce-delay-ms:	Debouncing interval time in microseconds.
+- linux,keymap: 	The keymap for keys as described in the binding
+			document (devicetree/bindings/input/matrix-keymap.txt).
+
+Optional properties:
+- linux,no-autorepeat:	Disable keyrepeat.
+- default-brightness-level: Initial brightness level [0-15] (default: 15).
+
+Example:
+
+&i2c1 {
+	ht16k33: ht16k33@70 {
+		compatible = "holtek,ht16k33";
+		reg = <0x70>;
+		refresh-rate-hz = <20>;
+		debounce-delay-ms = <50>;
+		interrupt-parent = <&gpio4>;
+		interrupts = <5 (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING)>;
+		linux,keymap = <
+			MATRIX_KEY(2, 0, KEY_F6)
+			MATRIX_KEY(3, 0, KEY_F8)
+			MATRIX_KEY(4, 0, KEY_F10)
+			MATRIX_KEY(5, 0, KEY_F4)
+			MATRIX_KEY(6, 0, KEY_F2)
+			MATRIX_KEY(2, 1, KEY_F5)
+			MATRIX_KEY(3, 1, KEY_F7)
+			MATRIX_KEY(4, 1, KEY_F9)
+			MATRIX_KEY(5, 1, KEY_F3)
+			MATRIX_KEY(6, 1, KEY_F1)
+		>;
+	};
+};
diff --git a/drivers/auxdisplay/Kconfig b/drivers/auxdisplay/Kconfig
index c07e725..75ad4f5 100644
--- a/drivers/auxdisplay/Kconfig
+++ b/drivers/auxdisplay/Kconfig
@@ -119,4 +119,13 @@ config CFAG12864B_RATE
 	  If you compile this as a module, you can still override this
 	  value using the module parameters.
 
+config HT16K33
+	tristate "Holtek Ht16K33 LED controller with keyscan"
+	depends on FB && OF && I2C && INPUT
+	select INPUT_MATRIXKMAP
+	select FB_BACKLIGHT
+	help
+	  Say yes here to add support for Holtek HT16K33, RAM mapping 16*8
+	  LED controller driver with keyscan.
+
 endif # AUXDISPLAY
diff --git a/drivers/auxdisplay/Makefile b/drivers/auxdisplay/Makefile
index 8a8936a..d7c9ef5 100644
--- a/drivers/auxdisplay/Makefile
+++ b/drivers/auxdisplay/Makefile
@@ -4,3 +4,4 @@
 
 obj-$(CONFIG_KS0108)		+= ks0108.o
 obj-$(CONFIG_CFAG12864B)	+= cfag12864b.o cfag12864bfb.o
+obj-$(CONFIG_HT16K33)		+= ht16k33.o
diff --git a/drivers/auxdisplay/ht16k33.c b/drivers/auxdisplay/ht16k33.c
new file mode 100644
index 0000000..eeb323f
--- /dev/null
+++ b/drivers/auxdisplay/ht16k33.c
@@ -0,0 +1,563 @@
+/*
+ * HT16K33 driver
+ *
+ * Author: Robin van der Gracht <robin@protonic.nl>
+ *
+ * Copyright: (C) 2016 Protonic Holland.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/interrupt.h>
+#include <linux/i2c.h>
+#include <linux/of.h>
+#include <linux/fb.h>
+#include <linux/slab.h>
+#include <linux/backlight.h>
+#include <linux/input.h>
+#include <linux/input/matrix_keypad.h>
+#include <linux/workqueue.h>
+#include <linux/mm.h>
+
+/* Registers */
+#define REG_SYSTEM_SETUP		0x20
+#define REG_SYSTEM_SETUP_OSC_ON		BIT(0)
+
+#define REG_DISPLAY_SETUP		0x80
+#define REG_DISPLAY_SETUP_ON		BIT(0)
+
+#define REG_ROWINT_SET			0xA0
+#define REG_ROWINT_SET_INT_EN		BIT(0)
+#define REG_ROWINT_SET_INT_ACT_HIGH	BIT(1)
+
+#define REG_BRIGHTNESS			0xE0
+
+/* Defines */
+#define DRIVER_NAME			"ht16k33"
+
+#define MIN_BRIGHTNESS			0x1
+#define MAX_BRIGHTNESS			0x10
+
+#define HT16K33_MATRIX_LED_MAX_COLS	8
+#define HT16K33_MATRIX_LED_MAX_ROWS	16
+#define HT16K33_MATRIX_KEYPAD_MAX_COLS	3
+#define HT16K33_MATRIX_KEYPAD_MAX_ROWS	12
+
+#define BYTES_PER_ROW		(HT16K33_MATRIX_LED_MAX_ROWS / 8)
+#define HT16K33_FB_SIZE		(HT16K33_MATRIX_LED_MAX_COLS * BYTES_PER_ROW)
+
+struct ht16k33_keypad {
+	struct input_dev *dev;
+	spinlock_t lock;
+	struct delayed_work work;
+	uint32_t cols;
+	uint32_t rows;
+	uint32_t row_shift;
+	uint32_t debounce_ms;
+	uint16_t last_key_state[HT16K33_MATRIX_KEYPAD_MAX_COLS];
+};
+
+struct ht16k33_fbdev {
+	struct fb_info *info;
+	uint32_t refresh_rate;
+	uint8_t *buffer;
+	uint8_t *cache;
+	struct delayed_work work;
+};
+
+struct ht16k33_priv {
+	struct i2c_client *client;
+	struct ht16k33_keypad keypad;
+	struct ht16k33_fbdev fbdev;
+	struct workqueue_struct *workqueue;
+};
+
+static struct fb_fix_screeninfo ht16k33_fb_fix = {
+	.id		= DRIVER_NAME,
+	.type		= FB_TYPE_PACKED_PIXELS,
+	.visual		= FB_VISUAL_MONO10,
+	.xpanstep	= 0,
+	.ypanstep	= 0,
+	.ywrapstep	= 0,
+	.line_length	= HT16K33_MATRIX_LED_MAX_ROWS,
+	.accel		= FB_ACCEL_NONE,
+};
+
+static struct fb_var_screeninfo ht16k33_fb_var = {
+	.xres = HT16K33_MATRIX_LED_MAX_ROWS,
+	.yres = HT16K33_MATRIX_LED_MAX_COLS,
+	.xres_virtual = HT16K33_MATRIX_LED_MAX_ROWS,
+	.yres_virtual = HT16K33_MATRIX_LED_MAX_COLS,
+	.bits_per_pixel = 1,
+	.red = { 0, 1, 0 },
+	.green = { 0, 1, 0 },
+	.blue = { 0, 1, 0 },
+	.left_margin = 0,
+	.right_margin = 0,
+	.upper_margin = 0,
+	.lower_margin = 0,
+	.vmode = FB_VMODE_NONINTERLACED,
+};
+
+static int ht16k33_display_on(struct ht16k33_priv *priv)
+{
+	uint8_t data = REG_DISPLAY_SETUP | REG_DISPLAY_SETUP_ON;
+
+	return i2c_smbus_write_byte(priv->client, data);
+}
+
+static int ht16k33_display_off(struct ht16k33_priv *priv)
+{
+	return i2c_smbus_write_byte(priv->client, REG_DISPLAY_SETUP);
+}
+
+static void ht16k33_fb_queue(struct ht16k33_priv *priv)
+{
+	struct ht16k33_fbdev *fbdev = &priv->fbdev;
+
+	queue_delayed_work(priv->workqueue, &fbdev->work,
+		msecs_to_jiffies(HZ / fbdev->refresh_rate));
+}
+
+static void ht16k33_keypad_queue(struct ht16k33_priv *priv)
+{
+	struct ht16k33_keypad *keypad = &priv->keypad;
+
+	queue_delayed_work(priv->workqueue, &keypad->work,
+		msecs_to_jiffies(keypad->debounce_ms));
+}
+
+/*
+ * This gets the fb data from cache and copies it to ht16k33 display RAM
+ */
+static void ht16k33_fb_update(struct work_struct *work)
+{
+	struct ht16k33_fbdev *fbdev =
+		container_of(work, struct ht16k33_fbdev, work.work);
+	struct ht16k33_priv *priv =
+		container_of(fbdev, struct ht16k33_priv, fbdev);
+
+	uint8_t *p1, *p2;
+	int len, pos = 0, first = -1;
+
+	p1 = fbdev->cache;
+	p2 = fbdev->buffer;
+
+	/* Search for the first byte with changes */
+	while (pos < HT16K33_FB_SIZE && first < 0) {
+		if (*(p1++) - *(p2++))
+			first = pos;
+		pos++;
+	}
+
+	/* No changes found */
+	if (first < 0)
+		goto requeue;
+
+	len = HT16K33_FB_SIZE - first;
+	p1 = fbdev->cache + HT16K33_FB_SIZE - 1;
+	p2 = fbdev->buffer + HT16K33_FB_SIZE - 1;
+
+	/* Determine i2c transfer length */
+	while (len > 1) {
+		if (*(p1--) - *(p2--))
+			break;
+		len--;
+	}
+
+	p1 = fbdev->cache + first;
+	p2 = fbdev->buffer + first;
+	if (!i2c_smbus_write_i2c_block_data(priv->client, first, len, p2))
+		memcpy(p1, p2, len);
+requeue:
+	ht16k33_fb_queue(priv);
+}
+
+static int ht16k33_keypad_start(struct input_dev *dev)
+{
+	struct ht16k33_priv *priv = input_get_drvdata(dev);
+	struct ht16k33_keypad *keypad = &priv->keypad;
+
+	/*
+	 * Schedule an immediate key scan to capture current key state;
+	 * columns will be activated and IRQs be enabled after the scan.
+	 */
+	queue_delayed_work(priv->workqueue, &keypad->work, 0);
+	return 0;
+}
+
+static void ht16k33_keypad_stop(struct input_dev *dev)
+{
+	struct ht16k33_priv *priv = input_get_drvdata(dev);
+	struct ht16k33_keypad *keypad = &priv->keypad;
+
+	cancel_delayed_work(&keypad->work);
+	/*
+	 * ht16k33_keypad_scan() will leave IRQs enabled;
+	 * we should disable them now.
+	 */
+	disable_irq_nosync(priv->client->irq);
+}
+
+static int ht16k33_initialize(struct ht16k33_priv *priv)
+{
+	uint8_t byte;
+	int err;
+	uint8_t data[HT16K33_MATRIX_LED_MAX_COLS * 2];
+
+	/* Clear RAM (8 * 16 bits) */
+	memset(data, 0, sizeof(data));
+	err = i2c_smbus_write_block_data(priv->client, 0, sizeof(data), data);
+	if (err)
+		return err;
+
+	/* Turn on internal oscillator */
+	byte = REG_SYSTEM_SETUP_OSC_ON | REG_SYSTEM_SETUP;
+	err = i2c_smbus_write_byte(priv->client, byte);
+	if (err)
+		return err;
+
+	/* Configure INT pin */
+	byte = REG_ROWINT_SET | REG_ROWINT_SET_INT_ACT_HIGH;
+	if (priv->client->irq > 0)
+		byte |= REG_ROWINT_SET_INT_EN;
+	return i2c_smbus_write_byte(priv->client, byte);
+}
+
+/*
+ * This gets the keys from keypad and reports it to input subsystem
+ */
+static void ht16k33_keypad_scan(struct work_struct *work)
+{
+	struct ht16k33_keypad *keypad =
+		container_of(work, struct ht16k33_keypad, work.work);
+	struct ht16k33_priv *priv =
+		container_of(keypad, struct ht16k33_priv, keypad);
+	const unsigned short *keycodes = keypad->dev->keycode;
+	uint16_t bits_changed, new_state[HT16K33_MATRIX_KEYPAD_MAX_COLS];
+	uint8_t data[HT16K33_MATRIX_KEYPAD_MAX_COLS * 2];
+	int row, col, code;
+	bool reschedule = false;
+
+	if (i2c_smbus_read_i2c_block_data(priv->client, 0x40, 6, data) != 6) {
+		dev_err(&priv->client->dev, "Failed to read key data\n");
+		goto end;
+	}
+
+	for (col = 0; col < keypad->cols; col++) {
+		new_state[col] = (data[col * 2 + 1] << 8) | data[col * 2];
+		if (new_state[col])
+			reschedule = true;
+		bits_changed = keypad->last_key_state[col] ^ new_state[col];
+
+		while (bits_changed) {
+			row = ffs(bits_changed) - 1;
+			code = MATRIX_SCAN_CODE(row, col, keypad->row_shift);
+			input_event(keypad->dev, EV_MSC, MSC_SCAN, code);
+			input_report_key(keypad->dev, keycodes[code],
+					 new_state[col] & BIT(row));
+			bits_changed &= ~BIT(row);
+		}
+	}
+	input_sync(keypad->dev);
+	memcpy(keypad->last_key_state, new_state, sizeof(new_state));
+
+end:
+	if (reschedule)
+		ht16k33_keypad_queue(priv);
+	else
+		enable_irq(priv->client->irq);
+}
+
+static irqreturn_t ht16k33_irq_thread(int irq, void *dev)
+{
+	struct ht16k33_priv *priv = dev;
+
+	disable_irq_nosync(priv->client->irq);
+	ht16k33_keypad_queue(priv);
+
+	return IRQ_HANDLED;
+}
+
+static int ht16k33_bl_update_status(struct backlight_device *bl)
+{
+	int brightness = bl->props.brightness;
+	struct ht16k33_priv *priv = bl_get_data(bl);
+
+	if (bl->props.power != FB_BLANK_UNBLANK ||
+	    bl->props.fb_blank != FB_BLANK_UNBLANK ||
+	    bl->props.state & BL_CORE_FBBLANK || brightness == 0) {
+		return ht16k33_display_off(priv);
+	}
+
+	ht16k33_display_on(priv);
+	return i2c_smbus_write_byte(priv->client,
+				    REG_BRIGHTNESS | (brightness - 1));
+}
+
+static int ht16k33_bl_check_fb(struct backlight_device *bl, struct fb_info *fi)
+{
+	struct ht16k33_priv *priv = bl_get_data(bl);
+
+	return (fi == NULL) || (fi->par == priv);
+}
+
+static const struct backlight_ops ht16k33_bl_ops = {
+	.update_status	= ht16k33_bl_update_status,
+	.check_fb	= ht16k33_bl_check_fb,
+};
+
+static int ht16k33_mmap(struct fb_info *info, struct vm_area_struct *vma)
+{
+	struct ht16k33_priv *priv = info->par;
+
+	return vm_insert_page(vma, vma->vm_start,
+			      virt_to_page(priv->fbdev.buffer));
+}
+
+static struct fb_ops ht16k33_fb_ops = {
+	.owner = THIS_MODULE,
+	.fb_read = fb_sys_read,
+	.fb_write = fb_sys_write,
+	.fb_fillrect = sys_fillrect,
+	.fb_copyarea = sys_copyarea,
+	.fb_imageblit = sys_imageblit,
+	.fb_mmap = ht16k33_mmap,
+};
+
+static int ht16k33_probe(struct i2c_client *client,
+				  const struct i2c_device_id *id)
+{
+	int err;
+	uint32_t rows, cols, dft_brightness;
+	struct backlight_device *bl;
+	struct backlight_properties bl_props;
+	struct ht16k33_priv *priv;
+	struct ht16k33_keypad *keypad;
+	struct ht16k33_fbdev *fbdev;
+	struct device_node *node = client->dev.of_node;
+
+	if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
+		dev_err(&client->dev, "i2c_check_functionality error\n");
+		return -EIO;
+	}
+
+	if (client->irq <= 0) {
+		dev_err(&client->dev, "No IRQ specified\n");
+		return -EINVAL;
+	}
+
+	priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL);
+	if (!priv)
+		return -ENOMEM;
+
+	priv->client = client;
+	i2c_set_clientdata(client, priv);
+	fbdev = &priv->fbdev;
+	keypad = &priv->keypad;
+
+	priv->workqueue = create_singlethread_workqueue(DRIVER_NAME "-wq");
+	if (priv->workqueue == NULL)
+		return -ENOMEM;
+
+	err = ht16k33_initialize(priv);
+	if (err)
+		goto err_destroy_wq;
+
+	/* Framebuffer (2 bytes per column) */
+	BUILD_BUG_ON(PAGE_SIZE < HT16K33_FB_SIZE);
+	fbdev->buffer = (unsigned char *) get_zeroed_page(GFP_KERNEL);
+	if (!fbdev->buffer) {
+		err = -ENOMEM;
+		goto err_free_fbdev;
+	}
+
+	fbdev->cache = devm_kmalloc(&client->dev, HT16K33_FB_SIZE, GFP_KERNEL);
+	if (!fbdev->cache) {
+		err = -ENOMEM;
+		goto err_fbdev_buffer;
+	}
+
+	fbdev->info = framebuffer_alloc(0, &client->dev);
+	if (!fbdev->info) {
+		err = -ENOMEM;
+		goto err_fbdev_buffer;
+	}
+
+	err = of_property_read_u32(node, "refresh-rate-hz",
+		&fbdev->refresh_rate);
+	if (err) {
+		dev_err(&client->dev, "refresh rate not specified\n");
+		goto err_fbdev_info;
+	}
+	fb_bl_default_curve(fbdev->info, 0, MIN_BRIGHTNESS, MAX_BRIGHTNESS);
+
+	INIT_DELAYED_WORK(&fbdev->work, ht16k33_fb_update);
+	fbdev->info->fbops = &ht16k33_fb_ops;
+	fbdev->info->screen_base = (char __iomem *) fbdev->buffer;
+	fbdev->info->screen_size = HT16K33_FB_SIZE;
+	fbdev->info->fix = ht16k33_fb_fix;
+	fbdev->info->var = ht16k33_fb_var;
+	fbdev->info->pseudo_palette = NULL;
+	fbdev->info->flags = FBINFO_FLAG_DEFAULT;
+	fbdev->info->par = priv;
+
+	err = register_framebuffer(fbdev->info);
+	if (err)
+		goto err_fbdev_info;
+
+	/* Keypad */
+	keypad->dev = devm_input_allocate_device(&client->dev);
+	if (!keypad->dev) {
+		err = -ENOMEM;
+		goto err_fbdev_unregister;
+	}
+
+	keypad->dev->name = DRIVER_NAME"-keypad";
+	keypad->dev->id.bustype = BUS_I2C;
+	keypad->dev->open = ht16k33_keypad_start;
+	keypad->dev->close = ht16k33_keypad_stop;
+
+	if (!of_get_property(node, "linux,no-autorepeat", NULL))
+		__set_bit(EV_REP, keypad->dev->evbit);
+
+	err = of_property_read_u32(node, "debounce-delay-ms",
+				   &keypad->debounce_ms);
+	if (err) {
+		dev_err(&client->dev, "key debounce delay not specified\n");
+		goto err_fbdev_unregister;
+	}
+
+	err = devm_request_threaded_irq(&client->dev, client->irq, NULL,
+					ht16k33_irq_thread,
+					IRQF_TRIGGER_RISING | IRQF_ONESHOT,
+					DRIVER_NAME, priv);
+	if (err) {
+		dev_err(&client->dev, "irq request failed %d, error %d\n",
+			client->irq, err);
+		goto err_fbdev_unregister;
+	}
+
+	disable_irq_nosync(client->irq);
+	rows = HT16K33_MATRIX_KEYPAD_MAX_ROWS;
+	cols = HT16K33_MATRIX_KEYPAD_MAX_COLS;
+	err = matrix_keypad_parse_of_params(&client->dev, &rows, &cols);
+	if (err)
+		goto err_fbdev_unregister;
+
+	err = matrix_keypad_build_keymap(NULL, NULL, rows, cols, NULL,
+					 keypad->dev);
+	if (err) {
+		dev_err(&client->dev, "failed to build keymap\n");
+		goto err_fbdev_unregister;
+	}
+
+	input_set_drvdata(keypad->dev, priv);
+	keypad->rows = rows;
+	keypad->cols = cols;
+	keypad->row_shift = get_count_order(cols);
+	INIT_DELAYED_WORK(&keypad->work, ht16k33_keypad_scan);
+
+	err = input_register_device(keypad->dev);
+	if (err)
+		goto err_fbdev_unregister;
+
+	/* Backlight */
+	memset(&bl_props, 0, sizeof(struct backlight_properties));
+	bl_props.type = BACKLIGHT_RAW;
+	bl_props.max_brightness = MAX_BRIGHTNESS;
+
+	bl = devm_backlight_device_register(&client->dev, DRIVER_NAME"-bl",
+					    &client->dev, priv,
+					    &ht16k33_bl_ops, &bl_props);
+	if (IS_ERR(bl)) {
+		dev_err(&client->dev, "failed to register backlight\n");
+		err = PTR_ERR(bl);
+		goto err_keypad_unregister;
+	}
+
+	err = of_property_read_u32(node, "default-brightness-level",
+				   &dft_brightness);
+	if (err) {
+		dft_brightness = MAX_BRIGHTNESS;
+	} else if (dft_brightness > MAX_BRIGHTNESS) {
+		dev_warn(&client->dev,
+			 "invalid default brightness level: %u, using %u\n",
+			 dft_brightness, MAX_BRIGHTNESS);
+		dft_brightness = MAX_BRIGHTNESS;
+	}
+
+	bl->props.brightness = dft_brightness;
+	ht16k33_bl_update_status(bl);
+
+	ht16k33_fb_queue(priv);
+	return 0;
+
+err_keypad_unregister:
+	input_unregister_device(keypad->dev);
+err_fbdev_unregister:
+	unregister_framebuffer(fbdev->info);
+err_fbdev_info:
+	framebuffer_release(fbdev->info);
+err_fbdev_buffer:
+	free_page((unsigned long) fbdev->buffer);
+err_free_fbdev:
+	kfree(fbdev);
+err_destroy_wq:
+	destroy_workqueue(priv->workqueue);
+
+	return err;
+}
+
+static int ht16k33_remove(struct i2c_client *client)
+{
+	struct ht16k33_priv *priv = i2c_get_clientdata(client);
+	struct ht16k33_keypad *keypad = &priv->keypad;
+	struct ht16k33_fbdev *fbdev = &priv->fbdev;
+
+	ht16k33_keypad_stop(keypad->dev);
+
+	cancel_delayed_work(&fbdev->work);
+	unregister_framebuffer(fbdev->info);
+	framebuffer_release(fbdev->info);
+	free_page((unsigned long) fbdev->buffer);
+
+	destroy_workqueue(priv->workqueue);
+	return 0;
+}
+
+static const struct i2c_device_id ht16k33_i2c_match[] = {
+	{ "ht16k33", 0 },
+	{ }
+};
+MODULE_DEVICE_TABLE(i2c, ht16k33_i2c_match);
+
+static const struct of_device_id ht16k33_of_match[] = {
+	{ .compatible = "holtek,ht16k33", },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, ht16k33_of_match);
+
+static struct i2c_driver ht16k33_driver = {
+	.probe		= ht16k33_probe,
+	.remove		= ht16k33_remove,
+	.driver		= {
+		.name		= DRIVER_NAME,
+		.of_match_table	= of_match_ptr(ht16k33_of_match),
+	},
+	.id_table = ht16k33_i2c_match,
+};
+module_i2c_driver(ht16k33_driver);
+
+MODULE_DESCRIPTION("Holtek HT16K33 driver");
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Robin van der Gracht <robin@protonic.nl>");
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v6 3/3] MAINTAINERS: auxdisplay: Added myself as maintainer for ht16k33 driver
  2016-05-18 12:23 [PATCH v6 0/3] auxdisplay: Introduce ht16k33 driver Robin van der Gracht
  2016-05-18 12:23 ` [PATCH v6 1/3] of: add vendor prefix for Holtek Semiconductor Robin van der Gracht
  2016-05-18 12:23 ` [PATCH v6 2/3] auxdisplay: ht16k33: Driver for LED controller Robin van der Gracht
@ 2016-05-18 12:23 ` Robin van der Gracht
  2016-05-18 14:32   ` Linus Walleij
  2016-05-18 15:09 ` [PATCH v6 0/3] auxdisplay: Introduce " Greg Kroah-Hartman
  3 siblings, 1 reply; 15+ messages in thread
From: Robin van der Gracht @ 2016-05-18 12:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Miguel Ojeda Sandonis, Thierry Reding, Shawn Guo,
	Jonathan Cameron, Matt Ranostay, Andrew Morton, David S . Miller,
	Greg Kroah-Hartman, Kalle Valo, Mauro Carvalho Chehab,
	Guenter Roeck, Jiri Slaby, devicetree, Robin van der Gracht

Signed-off-by: Robin van der Gracht <robin@protonic.nl>
---
 MAINTAINERS | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 9c567a4..54aed16 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2816,6 +2816,12 @@ F:	drivers/usb/host/whci/
 F:	drivers/usb/wusbcore/
 F:	include/linux/usb/wusb*
 
+HT16K33 LED CONTROLLER DRIVER
+M:	Robin van der Gracht <robin@protonic.nl>
+S:	Maintained
+F:	drivers/auxdisplay/ht16k33.c
+F:	Documentation/devicetree/bindings/display/ht16k33.txt
+
 CFAG12864B LCD DRIVER
 M:	Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
 W:	http://miguelojeda.es/auxdisplay.htm
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH v6 3/3] MAINTAINERS: auxdisplay: Added myself as maintainer for ht16k33 driver
  2016-05-18 12:23 ` [PATCH v6 3/3] MAINTAINERS: auxdisplay: Added myself as maintainer for ht16k33 driver Robin van der Gracht
@ 2016-05-18 14:32   ` Linus Walleij
  0 siblings, 0 replies; 15+ messages in thread
From: Linus Walleij @ 2016-05-18 14:32 UTC (permalink / raw)
  To: Robin van der Gracht
  Cc: linux-kernel, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Miguel Ojeda Sandonis, Thierry Reding,
	Shawn Guo, Jonathan Cameron, Matt Ranostay, Andrew Morton,
	David S . Miller, Greg Kroah-Hartman, Kalle Valo,
	Mauro Carvalho Chehab, Guenter Roeck, Jiri Slaby, devicetree

On Wed, May 18, 2016 at 2:23 PM, Robin van der Gracht <robin@protonic.nl> wrote:

> Signed-off-by: Robin van der Gracht <robin@protonic.nl>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v6 0/3] auxdisplay: Introduce ht16k33 driver
  2016-05-18 12:23 [PATCH v6 0/3] auxdisplay: Introduce ht16k33 driver Robin van der Gracht
                   ` (2 preceding siblings ...)
  2016-05-18 12:23 ` [PATCH v6 3/3] MAINTAINERS: auxdisplay: Added myself as maintainer for ht16k33 driver Robin van der Gracht
@ 2016-05-18 15:09 ` Greg Kroah-Hartman
  2016-05-19  8:54   ` Robin van der Gracht
  3 siblings, 1 reply; 15+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-18 15:09 UTC (permalink / raw)
  To: Robin van der Gracht
  Cc: linux-kernel, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Miguel Ojeda Sandonis, Thierry Reding,
	Shawn Guo, Jonathan Cameron, Matt Ranostay, Andrew Morton,
	David S . Miller, Kalle Valo, Mauro Carvalho Chehab,
	Guenter Roeck, Jiri Slaby, devicetree

On Wed, May 18, 2016 at 02:23:16PM +0200, Robin van der Gracht wrote:
> This patchset adds a new driver to the auxdisplay subsystem. It also adds
> devicetree bindings documentation and a new vendor prefix.
> 
> I added myself as maintainer to the MAINTAINERS file.

First off, if you want me to apply patches, put me in the to: line, and
say so, otherwise I don't know.

Secondly, it's the middle of the merge window, and we can't take new
patches into our trees (go read Documentation/development_model please),
so this will have to wait until after 4.7-rc1 is out.

Thirdly, I need an ack for the DT-related change before I can accept
that, hopefully you included the correct people on it.

And 4th, what is with the insane number of people on cc:?  Use
get_maintainer.pl correctly please, and don't just hit everyone you can
possibly think of with a cc: for no good reason.

I'll put this in my "to-review" queue to look at after 4.7-rc1 is out.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v6 1/3] of: add vendor prefix for Holtek Semiconductor
  2016-05-18 12:23 ` [PATCH v6 1/3] of: add vendor prefix for Holtek Semiconductor Robin van der Gracht
@ 2016-05-18 23:17   ` Rob Herring
  0 siblings, 0 replies; 15+ messages in thread
From: Rob Herring @ 2016-05-18 23:17 UTC (permalink / raw)
  To: Robin van der Gracht
  Cc: linux-kernel, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Miguel Ojeda Sandonis, Thierry Reding, Shawn Guo,
	Jonathan Cameron, Matt Ranostay, Andrew Morton, David S . Miller,
	Greg Kroah-Hartman, Kalle Valo, Mauro Carvalho Chehab,
	Guenter Roeck, Jiri Slaby, devicetree

On Wed, May 18, 2016 at 02:23:17PM +0200, Robin van der Gracht wrote:
> Signed-off-by: Robin van der Gracht <robin@protonic.nl>
> ---
>  Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
>  1 file changed, 1 insertion(+)

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v6 2/3] auxdisplay: ht16k33: Driver for LED controller
  2016-05-18 12:23 ` [PATCH v6 2/3] auxdisplay: ht16k33: Driver for LED controller Robin van der Gracht
@ 2016-05-18 23:23   ` Rob Herring
  0 siblings, 0 replies; 15+ messages in thread
From: Rob Herring @ 2016-05-18 23:23 UTC (permalink / raw)
  To: Robin van der Gracht
  Cc: linux-kernel, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Miguel Ojeda Sandonis, Thierry Reding, Shawn Guo,
	Jonathan Cameron, Matt Ranostay, Andrew Morton, David S . Miller,
	Greg Kroah-Hartman, Kalle Valo, Mauro Carvalho Chehab,
	Guenter Roeck, Jiri Slaby, devicetree

On Wed, May 18, 2016 at 02:23:18PM +0200, Robin van der Gracht wrote:
> Added a driver for the Holtek HT16K33 LED controller with keyscan.
> 
> Signed-off-by: Robin van der Gracht <robin@protonic.nl>
> ---
> Changes in v6:
>     - Fixed minor typo in documentation 'KEY_F0' -> 'KEY_F10'
> 
>  .../devicetree/bindings/display/ht16k33.txt        |  42 ++
>  drivers/auxdisplay/Kconfig                         |   9 +
>  drivers/auxdisplay/Makefile                        |   1 +
>  drivers/auxdisplay/ht16k33.c                       | 563 +++++++++++++++++++++
>  4 files changed, 615 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/ht16k33.txt
>  create mode 100644 drivers/auxdisplay/ht16k33.c
> 
> diff --git a/Documentation/devicetree/bindings/display/ht16k33.txt b/Documentation/devicetree/bindings/display/ht16k33.txt
> new file mode 100644
> index 0000000..5c11320
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/ht16k33.txt
> @@ -0,0 +1,42 @@
> +Holtek ht16k33 RAM mapping 16*8 LED controller driver with keyscan
> +-------------------------------------------------------------------------------
> +
> +Required properties:
> +- compatible:		"holtek,ht16k33"
> +- reg:			I2C slave address of the chip.
> +- interrupt-parent:	A phandle pointing to the interrupt controller
> +			serving the interrupt for this chip.
> +- interrupts:		Interrupt specification for the key pressed interrupt.
> +- refresh-rate-hz:	Display update interval in HZ.
> +- debounce-delay-ms:	Debouncing interval time in microseconds.

The units and description still don't match.

I acked the last one. Please add acks when sending new versions (unless 
of course you don't fix any trivial things noted).

Rob

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v6 0/3] auxdisplay: Introduce ht16k33 driver
  2016-05-18 15:09 ` [PATCH v6 0/3] auxdisplay: Introduce " Greg Kroah-Hartman
@ 2016-05-19  8:54   ` Robin van der Gracht
  2016-05-19 12:57     ` get_maintainer.pl and MAINTAINERS file Kalle Valo
  0 siblings, 1 reply; 15+ messages in thread
From: Robin van der Gracht @ 2016-05-19  8:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Miguel Ojeda Sandonis, Thierry Reding,
	Shawn Guo, Jonathan Cameron, Matt Ranostay, Andrew Morton,
	David S . Miller, Kalle Valo, Mauro Carvalho Chehab,
	Guenter Roeck, Jiri Slaby, devicetree

On Wed, 18 May 2016 08:09:24 -0700
Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:

> On Wed, May 18, 2016 at 02:23:16PM +0200, Robin van der Gracht wrote:
> > This patchset adds a new driver to the auxdisplay subsystem. It
> > also adds devicetree bindings documentation and a new vendor prefix.
> > 
> > I added myself as maintainer to the MAINTAINERS file.  
> 
> First off, if you want me to apply patches, put me in the to: line,
> and say so, otherwise I don't know.

Ack

> 
> Secondly, it's the middle of the merge window, and we can't take new
> patches into our trees (go read Documentation/development_model
> please), so this will have to wait until after 4.7-rc1 is out.

Thats fine with me.

> 
> Thirdly, I need an ack for the DT-related change before I can accept
> that, hopefully you included the correct people on it.

Rob (re)acked the patches this morning. I'll try not to forget to
re-add acks when I resubmit patches.

> 
> And 4th, what is with the insane number of people on cc:?  Use
> get_maintainer.pl correctly please, and don't just hit everyone you
> can possibly think of with a cc: for no good reason.

I did use the get_maintainer script. I solely passed the patch set as
command line argument.

> 
> I'll put this in my "to-review" queue to look at after 4.7-rc1 is out.

Thanks Greg.

Robin van der Gracht

^ permalink raw reply	[flat|nested] 15+ messages in thread

* get_maintainer.pl and MAINTAINERS file
  2016-05-19  8:54   ` Robin van der Gracht
@ 2016-05-19 12:57     ` Kalle Valo
  2016-05-19 14:25       ` Richard Weinberger
  2016-05-19 19:53       ` Jiri Slaby
  0 siblings, 2 replies; 15+ messages in thread
From: Kalle Valo @ 2016-05-19 12:57 UTC (permalink / raw)
  To: Robin van der Gracht
  Cc: Greg Kroah-Hartman, linux-kernel, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, Miguel Ojeda Sandonis,
	Thierry Reding, Shawn Guo, Jonathan Cameron, Matt Ranostay,
	Andrew Morton, David S . Miller, Mauro Carvalho Chehab,
	Guenter Roeck, Jiri Slaby, devicetree

(Changed the subject from "Re: [PATCH v6 0/3] auxdisplay: Introduce ht16k33 driver")

Robin van der Gracht <robin@protonic.nl> writes:

>> And 4th, what is with the insane number of people on cc:?  Use
>> get_maintainer.pl correctly please, and don't just hit everyone you
>> can possibly think of with a cc: for no good reason.
>
> I did use the get_maintainer script. I solely passed the patch set as
> command line argument.

I think get_maintainer script should ignore MAINTAINERS file altogether.
After I did drivers/net/wireless reorganisation, and had to make
numerous changes to MAINTAINERS in the process, I have been CCed to all
sorts of patchsets to which I have nothing to do with (this one
included). I suspect get_maintainer.pl is to blame here.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: get_maintainer.pl and MAINTAINERS file
  2016-05-19 12:57     ` get_maintainer.pl and MAINTAINERS file Kalle Valo
@ 2016-05-19 14:25       ` Richard Weinberger
  2016-05-19 16:57         ` Mauro Carvalho Chehab
  2016-05-19 19:53       ` Jiri Slaby
  1 sibling, 1 reply; 15+ messages in thread
From: Richard Weinberger @ 2016-05-19 14:25 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Robin van der Gracht, Greg Kroah-Hartman, LKML, Rob Herring,
	Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Miguel Ojeda Sandonis, Thierry Reding, Shawn Guo,
	Jonathan Cameron, Matt Ranostay, Andrew Morton, David S . Miller,
	Mauro Carvalho Chehab, Guenter Roeck, Jiri Slaby, devicetree

On Thu, May 19, 2016 at 2:57 PM, Kalle Valo <kvalo@codeaurora.org> wrote:
> (Changed the subject from "Re: [PATCH v6 0/3] auxdisplay: Introduce ht16k33 driver")
>
> Robin van der Gracht <robin@protonic.nl> writes:
>
>>> And 4th, what is with the insane number of people on cc:?  Use
>>> get_maintainer.pl correctly please, and don't just hit everyone you
>>> can possibly think of with a cc: for no good reason.
>>
>> I did use the get_maintainer script. I solely passed the patch set as
>> command line argument.
>
> I think get_maintainer script should ignore MAINTAINERS file altogether.
> After I did drivers/net/wireless reorganisation, and had to make
> numerous changes to MAINTAINERS in the process, I have been CCed to all
> sorts of patchsets to which I have nothing to do with (this one
> included). I suspect get_maintainer.pl is to blame here.

Are you sure it is because you are listed as maintainer for specific files?
If you are maintain something you have to be CC'ed.
It is rather because get_maintainer.pl tries to be smart and uses git to
find people who have touched a file...

I guess instead you want something like:
http://permalink.gmane.org/gmane.linux.kernel.commits.head/538561

-- 
Thanks,
//richard

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: get_maintainer.pl and MAINTAINERS file
  2016-05-19 14:25       ` Richard Weinberger
@ 2016-05-19 16:57         ` Mauro Carvalho Chehab
  2016-05-20 13:14           ` Kalle Valo
  0 siblings, 1 reply; 15+ messages in thread
From: Mauro Carvalho Chehab @ 2016-05-19 16:57 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: Kalle Valo, Robin van der Gracht, Greg Kroah-Hartman, LKML,
	Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Miguel Ojeda Sandonis, Thierry Reding, Shawn Guo,
	Jonathan Cameron, Matt Ranostay, Andrew Morton, David S . Miller,
	Guenter Roeck, Jiri Slaby, devicetree

Em Thu, 19 May 2016 16:25:45 +0200
Richard Weinberger <richard.weinberger@gmail.com> escreveu:

> On Thu, May 19, 2016 at 2:57 PM, Kalle Valo <kvalo@codeaurora.org> wrote:
> > (Changed the subject from "Re: [PATCH v6 0/3] auxdisplay: Introduce ht16k33 driver")
> >
> > Robin van der Gracht <robin@protonic.nl> writes:
> >  
> >>> And 4th, what is with the insane number of people on cc:?  Use
> >>> get_maintainer.pl correctly please, and don't just hit everyone you
> >>> can possibly think of with a cc: for no good reason.  
> >>
> >> I did use the get_maintainer script. I solely passed the patch set as
> >> command line argument.  
> >
> > I think get_maintainer script should ignore MAINTAINERS file altogether.
> > After I did drivers/net/wireless reorganisation, and had to make
> > numerous changes to MAINTAINERS in the process, I have been CCed to all
> > sorts of patchsets to which I have nothing to do with (this one
> > included). I suspect get_maintainer.pl is to blame here.  
> 
> Are you sure it is because you are listed as maintainer for specific files?
> If you are maintain something you have to be CC'ed.
> It is rather because get_maintainer.pl tries to be smart and uses git to
> find people who have touched a file...
> 
> I guess instead you want something like:
> http://permalink.gmane.org/gmane.linux.kernel.commits.head/538561

I guess what Kalle said is that the get_maintainer.pl script should
disable, by default, "--git-blame" behavior for some specific files that
everyone touches like /MAINTAINERS, Documentation/kernel-parameters.txt,
/CREDITS, etc,  as random people that touch on those files aren't really
interested on being c/c to every change there.

Regards,
Mauro

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: get_maintainer.pl and MAINTAINERS file
  2016-05-19 12:57     ` get_maintainer.pl and MAINTAINERS file Kalle Valo
  2016-05-19 14:25       ` Richard Weinberger
@ 2016-05-19 19:53       ` Jiri Slaby
  2016-05-19 22:32         ` Joe Perches
  1 sibling, 1 reply; 15+ messages in thread
From: Jiri Slaby @ 2016-05-19 19:53 UTC (permalink / raw)
  To: Kalle Valo, Robin van der Gracht, Joe Perches
  Cc: Mark Rutland, Pawel Moll, Kumar Gala, David S . Miller,
	Miguel Ojeda Sandonis, Matt Ranostay, Ian Campbell,
	Jonathan Cameron, Rob Herring, Shawn Guo, Andrew Morton,
	Greg Kroah-Hartman, Thierry Reding, Mauro Carvalho Chehab,
	Guenter Roeck, devicetree, linux-kernel

Cc: joe

On 05/19/2016, 02:57 PM, Kalle Valo wrote:
> (Changed the subject from "Re: [PATCH v6 0/3] auxdisplay: Introduce ht16k33 driver")
> 
> Robin van der Gracht <robin@protonic.nl> writes:
> 
>>> And 4th, what is with the insane number of people on cc:?  Use
>>> get_maintainer.pl correctly please, and don't just hit everyone you
>>> can possibly think of with a cc: for no good reason.
>>
>> I did use the get_maintainer script. I solely passed the patch set as
>> command line argument.
> 
> I think get_maintainer script should ignore MAINTAINERS file altogether.
> After I did drivers/net/wireless reorganisation, and had to make
> numerous changes to MAINTAINERS in the process, I have been CCed to all
> sorts of patchsets to which I have nothing to do with (this one
> included). I suspect get_maintainer.pl is to blame here.

Last time I even tried to fix this up, but failed due to time
limitations as the code is a bit complex.

Joe, you seem to be the one who touched the script many times recently.
May we ask you to fix this up?

thanks,
-- 
js
suse labs

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: get_maintainer.pl and MAINTAINERS file
  2016-05-19 19:53       ` Jiri Slaby
@ 2016-05-19 22:32         ` Joe Perches
  0 siblings, 0 replies; 15+ messages in thread
From: Joe Perches @ 2016-05-19 22:32 UTC (permalink / raw)
  To: Jiri Slaby, Kalle Valo, Robin van der Gracht
  Cc: Mark Rutland, Pawel Moll, Kumar Gala, David S . Miller,
	Miguel Ojeda Sandonis, Matt Ranostay, Ian Campbell,
	Jonathan Cameron, Rob Herring, Shawn Guo, Andrew Morton,
	Greg Kroah-Hartman, Thierry Reding, Mauro Carvalho Chehab,
	Guenter Roeck, devicetree, linux-kernel

On Thu, 2016-05-19 at 21:53 +0200, Jiri Slaby wrote:
> Cc: joe
> 
> On 05/19/2016, 02:57 PM, Kalle Valo wrote:
> > 
> > (Changed the subject from "Re: [PATCH v6 0/3] auxdisplay: Introduce ht16k33 driver")
> > 
> > Robin van der Gracht <robin@protonic.nl> writes:
> > 
> > > 
> > > > 
> > > > And 4th, what is with the insane number of people on cc:?  Use
> > > > get_maintainer.pl correctly please, and don't just hit everyone you
> > > > can possibly think of with a cc: for no good reason.
> > > I did use the get_maintainer script. I solely passed the patch set as
> > > command line argument.
> > I think get_maintainer script should ignore MAINTAINERS file altogether.

Maybe, maybe not.
The list of MAINTAINERS names returned by get_maintainer.pl is:

Andrew Morton <akpm@linux-foundation.org> (commit_signer:39/504=8%)
"David S. Miller" <davem@davemloft.net> (commit_signer:38/504=8%)
Greg Kroah-Hartman <gregkh@linuxfoundation.org> (commit_signer:36/504=7%)
Kalle Valo <kvalo@codeaurora.org> (commit_signer:28/504=6%)
Mauro Carvalho Chehab <mchehab@osg.samsung.com> (added_lines:109/2073=5%,removed_lines:108/779=14%)
Guenter Roeck <linux@roeck-us.net> (removed_lines:48/779=6%)
Jiri Slaby <jslaby@suse.com> (removed_lines:46/779=6%)

> > After I did drivers/net/wireless reorganisation, and had to make
> > numerous changes to MAINTAINERS in the process, I have been CCed to all
> > sorts of patchsets to which I have nothing to do with (this one
> > included). I suspect get_maintainer.pl is to blame here.

Doubtful but possible.
I have no idea how many files were modified by whatever
patch was checked, but more files, more maintainers.

Unmaintained files have even more "not quite maintainers",
but get_maintainer.pl lists the names of people that recently
modified those specific files.

> Last time I even tried to fix this up, but failed due to time
> limitations as the code is a bit complex.
> 
> Joe, you seem to be the one who touched the script many times recently.
> May we ask you to fix this up?

I'm not touching stuff right now.  Maybe next month.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: get_maintainer.pl and MAINTAINERS file
  2016-05-19 16:57         ` Mauro Carvalho Chehab
@ 2016-05-20 13:14           ` Kalle Valo
  0 siblings, 0 replies; 15+ messages in thread
From: Kalle Valo @ 2016-05-20 13:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Richard Weinberger, Robin van der Gracht, Greg Kroah-Hartman,
	LKML, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell,
	Kumar Gala, Miguel Ojeda Sandonis, Thierry Reding, Shawn Guo,
	Jonathan Cameron, Matt Ranostay, Andrew Morton, David S . Miller,
	Guenter Roeck, Jiri Slaby, devicetree

Mauro Carvalho Chehab <mchehab@osg.samsung.com> writes:

> Em Thu, 19 May 2016 16:25:45 +0200
> Richard Weinberger <richard.weinberger@gmail.com> escreveu:
>
>> On Thu, May 19, 2016 at 2:57 PM, Kalle Valo <kvalo@codeaurora.org> wrote:
>> > (Changed the subject from "Re: [PATCH v6 0/3] auxdisplay: Introduce ht16k33 driver")
>> >
>> > Robin van der Gracht <robin@protonic.nl> writes:
>> >  
>> >>> And 4th, what is with the insane number of people on cc:?  Use
>> >>> get_maintainer.pl correctly please, and don't just hit everyone you
>> >>> can possibly think of with a cc: for no good reason.  
>> >>
>> >> I did use the get_maintainer script. I solely passed the patch set as
>> >> command line argument.  
>> >
>> > I think get_maintainer script should ignore MAINTAINERS file altogether.
>> > After I did drivers/net/wireless reorganisation, and had to make
>> > numerous changes to MAINTAINERS in the process, I have been CCed to all
>> > sorts of patchsets to which I have nothing to do with (this one
>> > included). I suspect get_maintainer.pl is to blame here.  
>> 
>> Are you sure it is because you are listed as maintainer for specific files?
>> If you are maintain something you have to be CC'ed.

IIRC I have received patches about i2c and graphics stuff and I have no
recollection of ever sending even a single patch to those subsystems,
let alone maintaining them.

>> It is rather because get_maintainer.pl tries to be smart and uses git to
>> find people who have touched a file...
>> 
>> I guess instead you want something like:
>> http://permalink.gmane.org/gmane.linux.kernel.commits.head/538561
>
> I guess what Kalle said is that the get_maintainer.pl script should
> disable, by default, "--git-blame" behavior for some specific files that
> everyone touches like /MAINTAINERS, Documentation/kernel-parameters.txt,
> /CREDITS, etc,  as random people that touch on those files aren't really
> interested on being c/c to every change there.

Exactly my point, thank you. No need to pollute people's inboxes
unnecessary.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-05-20 13:14 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-18 12:23 [PATCH v6 0/3] auxdisplay: Introduce ht16k33 driver Robin van der Gracht
2016-05-18 12:23 ` [PATCH v6 1/3] of: add vendor prefix for Holtek Semiconductor Robin van der Gracht
2016-05-18 23:17   ` Rob Herring
2016-05-18 12:23 ` [PATCH v6 2/3] auxdisplay: ht16k33: Driver for LED controller Robin van der Gracht
2016-05-18 23:23   ` Rob Herring
2016-05-18 12:23 ` [PATCH v6 3/3] MAINTAINERS: auxdisplay: Added myself as maintainer for ht16k33 driver Robin van der Gracht
2016-05-18 14:32   ` Linus Walleij
2016-05-18 15:09 ` [PATCH v6 0/3] auxdisplay: Introduce " Greg Kroah-Hartman
2016-05-19  8:54   ` Robin van der Gracht
2016-05-19 12:57     ` get_maintainer.pl and MAINTAINERS file Kalle Valo
2016-05-19 14:25       ` Richard Weinberger
2016-05-19 16:57         ` Mauro Carvalho Chehab
2016-05-20 13:14           ` Kalle Valo
2016-05-19 19:53       ` Jiri Slaby
2016-05-19 22:32         ` Joe Perches

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 NNTP newsgroup(s).