lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 8 Aug 2018 10:32:38 +0200
From:   Sam Ravnborg <sam@...nborg.org>
To:     Noralf Trønnes <noralf@...nnes.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH v1 5/5] tinydrm: add winstar wg160160 driver

Hi Noralf.

On Tue, Aug 07, 2018 at 07:35:30PM +0200, Noralf Trønnes wrote:
> 
> Den 02.08.2018 21.45, skrev Sam Ravnborg:
> >Add driver for the winstar wg160160 display.
> >The driver utilises pardata-dbi that
> >again utilise the pardata subsystem.
> >
> >Signed-off-by: Sam Ravnborg <sam@...nborg.org>
> >---
> >  MAINTAINERS                        |   5 +
> >  drivers/gpu/drm/tinydrm/Kconfig    |  10 ++
> >  drivers/gpu/drm/tinydrm/Makefile   |   1 +
> >  drivers/gpu/drm/tinydrm/wg160160.c | 298 +++++++++++++++++++++++++++++++++++++
> >  4 files changed, 314 insertions(+)
> >  create mode 100644 drivers/gpu/drm/tinydrm/wg160160.c
> >
> 
> [...]
> 
> >+
> >+/**
> >+ * write_reg - Write instruction on parallel bus to controller
> >+ *
> >+ * Check BUSY flag and write instruction
> >+ *
> >+ * @pdd: pardata data
> >+ * @reg: The register to write
> >+ * @value: The value of the register
> >+ *
> >+ * Returns:
> >+ * Zero on success, negative error code on failure
> >+ */
> >+int write_reg(struct pardata_data *pdd, unsigned int reg, unsigned int value)
> >+{
> >+	int ins[PIN_NUM];
> >+	int val[PIN_NUM];
> >+	int i;
> >+
> >+	for (i = 0; i < PIN_NUM; i++)
> >+		ins[PIN_DB0 + i] = !!BIT(reg);
> >+
> >+	for (i = 0; i < PIN_NUM; i++)
> >+		val[PIN_DB0 + i] = !!(value & BIT(i));
> >+
> >+	gpiod_set_value_cansleep(pdd->bus->pin_rs, 1);
> >+	gpiod_set_array_value_cansleep(PIN_NUM, pdd->bus->data_pins->desc, ins);
> >+	wait_busy(pdd);
> >+	pardata_strobe_write(pdd);
> >+
> >+	gpiod_set_value_cansleep(pdd->bus->pin_rs, 0);
> >+	gpiod_set_array_value_cansleep(PIN_NUM, pdd->bus->data_pins->desc, val);
> >+	wait_busy(pdd);
> >+	pardata_strobe_write(pdd);
> >+
> >+	return 0;
> >+}
> 
> If this controller has normal registers, you could do a regmap
> implementation for pardata: drivers/base/regmap.

If I understand you correct then you suggest to add a regmap implementation
on top of the registers replacing the current gpio support?

So we in regmap can optimize access to the registers better.
Or did you have something else in mind?

As speed is not the main challenge here I will likely wait with this
and continue using gpio.

	Sam

Powered by blists - more mailing lists