Commit Graph

18 Commits

Author SHA1 Message Date
Jerry Lin 523275a8b3 staging: olpc_dcon: Convert all uses of old GPIO API to new descriptor API
This commit eliminate all uses of legacy integer base GPIO API in
olpc_dcon_xo_1_5.c and replace them with new descriptor GPIO API like
those in olpc_dcon_xo_1.c.

Also pull some common code with olpc_dcon_xo_1.c to olpc_dcon.h for code
sharing.

Signed-off-by: Jerry Lin <wahahab11@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-25 12:04:48 +02:00
Arkadiusz Lis c28b6699ac Staging: One Laptop Per Child: fix SPDX-License-Identifier issue
Add SPDX-License-Identifier to the source files.
Remove redundant, old license.

Signed-off-by: Arkadiusz Lis <areklis909@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:53:03 +02:00
Kenneth Hsu bd18762dc9 staging: olpc_dcon: add whitespace around binary operators
This fixes a coding style issue where whitespace characters were missing
around some binary OR operators.

Signed-off-by: Kenneth Hsu <kennethhsu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06 09:17:00 +01:00
Emmanuil Chatzipetru 08a36974c0 staging: olpc_dcon: olpc_dcon_xo_1_5: Remove multiple blank lines.
This issue is caught by checkpatch.pl and is related to the following
warning:
	- CHECK: Please don't use multiple blank lines

Signed-off-by: Emmanuil Chatzipetru <chatzi.emanuel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-10 17:40:15 +01:00
Emmanuil Chatzipetru 13c7faa540 staging: olpc_dcon: olpc_dcon_xo_1_5: Remove redundant return statement.
dcon_was_irq(); should return a boolean value if PMIO_Rx50[6] is either
set or unset, which is evaluated in the first return statement. Therefore,
the following return statement is redundant and thus, removed.

Signed-off-by: Emmanuil Chatzipetru <chatzi.emanuel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-10 17:40:15 +01:00
sayli karnik 069bb6a807 staging: olpc_dcon: Replace u_int8_t with u8
This patch replaces type u_int8_t with u8 as suggested by checkpatch.pl.

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-17 23:36:53 +02:00
Greg Kroah-Hartman 53c43c5ca1 Revert "Staging: olpc_dcon: Remove obsolete driver"
This reverts commit 82ef33af9d.  It turns
out these machines are still out there, and the original patch broke
them.  So revert it, adding back the driver, so people's machines still
work properly.

Reported-by: James Cameron <quozl@laptop.org>
Cc: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-04 13:52:35 -07:00
Shraddha Barke 82ef33af9d Staging: olpc_dcon: Remove obsolete driver
Remove support for One Laptop Per Child organization since it is dead.
http://www.olpcnews.com/about_olpc_news/goodbye_one_laptop_per_child.html

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28 23:13:35 -08:00
Andres Salomon 6c98274cba staging/olpc_dcon: drop pin frobbing code for xo1.5
This code looks in the PCI config space for pin addresses and sets up some
stuff.  However, Openfirmware has already done this for us, so there's no
need to ever do it in Linux.  According to Mitch Bradley, this OFW has been
doing this for us since at least B3 builds (pre-mass production).

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22 11:39:22 -07:00
Toshiaki Yamane ac9bbd085f staging/olpc_dcon: fix checkpatch warnings
The below checkpatch warnings was fixed,

-  WARNING: Prefer pr_debug(... to printk(KERN_DEBUG, ...
-  WARNING: Prefer pr_warn(... to printk(KERN_WARNING, ...
-  WARNING: Prefer pr_info(... to printk(KERN_INFO, ...
-  WARNING: Prefer pr_err(... to printk(KERN_ERR, ...

And added pr_fmt.

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Acked-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-17 09:45:37 -07:00
Xi Wang 91762057f4 staging: olpc_dcon: ->read_status() API change
Change ->read_status() by separating the error handling and the
status bits.  This also fixes a signedness bug in dcon_interrupt()
that would break the error handling.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Acked-by: Andres Salomon <dilinger@queued.net>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08 15:00:43 -08:00
Stefan Brähler a3712f4987 staging: olpc_dcon: fix space and coding issues
Fix the whitespace and coding style issues in olpc_dcon metioned by
checkpatch.

Signed-off-by: Stefan Brähler <Stefan.Braehler@gmail.com>
Acked-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 17:05:29 -07:00
Sascha Silbe bed4ab7781 staging: fix olpc_dcon build errors
drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c: In function ‘dcon_wiggle_xo_1_5’:
drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c:155: error: implicit declaration of function ‘udelay’
drivers/built-in.o: In function `dcon_read_status_xo_1':
olpc_dcon_xo_1.c:(.text+0x13472e): undefined reference to `cs5535_gpio_set'

Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-04 21:37:04 -07:00
Andres Salomon bbe963f1b9 staging: olpc_dcon: move more variables into dcon_priv
This moves dcon_source and dcon_pending into the dcon_priv struct.

Because these variables are used by the IRQ handler (which is
registered in the model-specific callbacks), we end up needing
to move dcon_priv into olpc_dcon.h.  This also changes the IRQ
registration to use the dcon_priv pointer as dev_id, instead of
dcon_driver.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:33:21 -08:00
Andres Salomon 097cd83a4c staging: olpc_dcon: add config options for XO_1 and XO_1_5, drop hardcoded XO-1 stuff
This adds CONFIG_FB_OLPC_DCON_1 and CONFIG_FB_OLPC_DCON_1_5 options for
allowing selection of XO-1 and/or XO-1.5 DCON support.  In the process,
it also forces the xo_1.c and xo_1_5.c files to build as separate units,
correctly selects between XO-1 and XO-1.5 at runtime, and adds some
hacks to allow xo_1_5.c to build.

This isn't the cleanest patch, but it'll get better as more global
variables are dropped.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:33:21 -08:00
Andres Salomon 8f2fb16a9c staging: olpc_dcon: drop XO-1.5 prototype support
Remove code related to XO-1.5 prototype boards.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:33:20 -08:00
Andres Salomon 7637c9259f drivers/staging/olpc_dcon: convert to new cs5535 gpio API
Drop the old geode_gpio crud, as well as the raw outl() calls; instead,
use the Linux GPIO API where possible, and the cs5535_gpio API in other
places.

Note that we don't actually clean up the driver properly yet (once loaded,
it always remains loaded).  That'll come later..

This patch is necessary for building the driver.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-01-13 08:03:13 -08:00
Andres Salomon eecb3e4e5d staging: olpc_dcon: add OLPC display controller (DCON) support
This adds DCON support for the OLPC XO.  The DCON is found in XO-1 and
XO-1.5 hardware.  The XO-1 has a CS5536 southbridge, while the XO-1.5
has a Via chipset; the GPIO magic that's necessary to communicate with
the DCON chip is unfortunately different across both platforms.  This
driver supports both.

This driver is in bad state atm, so I'm requesting its inclusion into
staging so it can be cleaned up while staying in the kernel tree.

Original driver by Dave Woodhouse, and modified extensively by
Jordan Crouse, myself, Deepak Saxena, Paul Fox, Daniel Drake, and
probably others that I've missed.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-29 18:01:40 -07:00