summaryrefslogtreecommitdiffstats
path: root/drivers/video/ssd1307fb.c
Commit message (Collapse)AuthorAgeFilesLines
* drivers: add missing SPDX-License-IdentifierAhmad Fatoum2021-11-011-2/+1
| | | | | | | | | | | | | | | | | | | | This adds the suitable SPDX-License-Identifier to all files in drivers/ that previously lacked one. To aid manual inspection, following heuristics can be used: * No changes outside of comments/whitespace: git show -U0 HEAD | rg -v '^(@@|diff|index)|[-+]([-+]|//|#|[\s/]\*)' * -or-later come in pairs: git show --inter-hunk-context=19 HEAD | \ perl -0777 -F'/^@/gm' -ne 'for (@F) { @m = /later/g; print if @m & 1 }' Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20211030175632.2276077-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: reunite fb devices with their hardware parentAhmad Fatoum2021-06-021-0/+1
| | | | | | | | | | | | So far, only sdlfb and efi associated the framebuffer device they register with the hardware device providing it. Follow suit for all other frame buffers. This enables devinfo to display parentage. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210527124453.22710-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: ssd1307fb: fix VBAT supply idMarco Felsch2020-09-291-1/+1
| | | | | | | | | The regulator id should be given without the "-supply" suffix else the core is searching for "vbat-supply-supply". Fixes: bf8f62d334 ("video/ssd1307fb: add support for VBAT") Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: ssd1307fb: Honour reset GPIO polaritySascha Hauer2020-08-181-7/+11
| | | | | | | The reset GPIO polarity was hardcoded as active low. Honour the polarity flags given in the device tree instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: ssd1307fb: fix null pointer dereference on errorAhmad Fatoum2020-05-041-1/+1
| | | | | | | | | | On error, a goto may jump over the initialization of vmem and free the uninitialized value during clean up. Fix this. Found by compiling the code with clang. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video/ssd1307fb: make reset GPIO optionalAhmad Fatoum2020-03-091-20/+23
| | | | | | | | Both reset GPIO and regulator are optional as per the binding and the driver can work without if we ignore their absence. Do so. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video/ssd1307fb: drop unneeded regulator NULL checksAhmad Fatoum2020-03-091-10/+6
| | | | | | | | regulator_{enable,disable} are already no-ops when the parameter is NULL. Drop the NULL checks thusly. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video/ssd1307fb: fix NULL pointer dereference in probeAhmad Fatoum2020-03-091-1/+3
| | | | | | | | info->priv is dereferenced before a valid value has been set leading to a NULL pointer dereference in the probe function. Fix this. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video/ssd1307fb: fix potential memory leak on errorOleksij Rempel2018-11-191-2/+5
| | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i2c: introduce device_i2c_driver() macroMarco Felsch2018-10-191-9/+1
| | | | | | | | | Add macro and dependency to avoid boilerplate code. Since now simple i2c drivers only have to include the i2c.h header and call the device_i2c_driver() macro to register a i2c device driver. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video/ssd1307fb: add support for VBATBastian Stender2017-07-301-0/+24
| | | | | | | | | | | Adds support to the driver to enable VBAT regulator at init time. This is similar to ba14301e0356 ("fbdev/ssd1307fb: add support to enable VBAT") and cfc5b2b551d8 ("fbdev/ssd1307fb: fix optional VBAT support") in Linux kernel. Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* video: add support for Solomon SSD1307 OLED controller familyBastian Stender2017-03-061-0/+567
It was ported from linux v4.10. Like the kernel driver only communication via I2C is supported. It has only been tested with a SSD1306 and a 96x16 OLED display: &i2c0 { status = "okay"; ssd1306: oled@3c { compatible = "solomon,ssd1306fb-i2c"; reg = <0x3c>; reset-gpios = <&gpio1 1 0>; solomon,height = <16>; solomon,width = <96>; solomon,page-offset = <0>; solomon,com-invdir; solomon,com-seq; }; Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>