aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/panel (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-02-03misc: Move panel driver out of stagingKsenija Stanojevic5-2756/+0
Move panel driver from drivers/staging/panel to drivers/misc. Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-01Merge 4.5-rc2 into staging-nextGreg Kroah-Hartman1-19/+15
This fixes a merge issue with the panel driver, and picks up fixes in iio and other drivers that we want here. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28Revert "Staging: panel: usleep_range is preferred over udelay"Sudip Mukherjee1-19/+15
This reverts commit ebd43516d3879f882a403836bba8bc5791f26a28. We should not be sleeping inside spin_lock. Fixes: ebd43516d387 ("Staging: panel: usleep_range is preferred over udelay") Cc: Sirnam Swetha <theonly.ultimate@gmail.com> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Reported-by: Huang, Ying <ying.huang@intel.com> Tested-by: Huang, Ying <ying.huang@intel.com> Cc: stable <stable@vger.kernel.org> # 4.4 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28Staging: panel: Make code more readableKsenija Stanojevic1-6/+6
Repace 'for' statement by strchr() function to make code more readable. Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28Staging: panel: Reduce value range for *nameKsenija Stanojevic1-1/+1
out is 0-9 so it's too much for om, therefore reduce value range for *name from '0'-'9' to '0'-'7'. Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28Staging: panel: Remove ULLKsenija Stanojevic1-2/+2
Remove ULL on om and im, since it's useless. Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28Staging: panel: Remove typedef pmask_tKsenija Stanojevic1-13/+11
Use __u64 instead of pmask_t and remove pmask_t since is useless. Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28Staging: panel: Use u8 typeKsenija Stanojevic1-3/+3
Declare om, im, omask and imask as u8 to remove any confusion if that describes the 8 bits of the data bus on the parallel port. Also change return type of lcd_write_data() to u8. Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28Staging: panel: Remove spaceKsenija Stanojevic1-1/+1
No space is necessary after a cast, therefore remove it. Found by checkpatch.pl Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28staging: update panel driver's author addressWilly Tarreau1-1/+1
I'm realizing that I sometimes miss e-mails sent to my old address, so better update it. Since I only have the relevant hardware at my work place, let's use this address so that I can test code if needed. Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28staging: panel: remove warnings line over 80 charactersRicardo Ruedas1-1/+2
This patch removes the warnings reported by checkpatch.pl for line over 80 characters. Signed-off-by: Ricardo Ruedas <ricardo.ruedas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28Staging: panel: Fixed a spacing after cast coding style issueDaniel H. Hemmingsen1-1/+1
Fixed a spacing after cast coding style issue. Signed-off-by: Daniel H. Hemmingsen <dhh.kernel@gmail.com> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29Staging: panel: Logical continuations should be on the previous lineSirnam Swetha1-6/+6
This patch fixes the checkpatch issue: CHECK: Logical continuations should be on the previous line Signed-off-by: Sirnam Swetha <theonly.ultimate@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29Staging: panel: usleep_range is preferred over udelaySirnam Swetha1-15/+19
This patch fixes the issue: CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt Signed-off-by: Sirnam Swetha <theonly.ultimate@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29Staging: panel: Removing multiple blank linesSirnam Swetha1-1/+0
This patch fixes the checkpatch issue CHECK: Please don't use multiple blank lines Signed-off-by: Sirnam Swetha <theonly.ultimate@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29Staging: panel: spaces preferred around that '/'Sirnam Swetha1-1/+1
This patch fixes the checkpatch issue: CHECK: spaces preferred around that '/' Signed-off-by: Sirnam Swetha <theonly.ultimate@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16staging: panel: Prefer using BIT MacroAmitoj Kaur Chawla1-3/+3
Replace bit shifting on 1 with the BIT(x) Macro The semantic patch used to find this is: @@ int g; @@ -(1 << g) +BIT(g) Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04Staging: panel: Replace NULL comparison.Aybuke Ozdemir1-10/+10
Use ! operating instead of NULL checks. Addresses "CHECK: Comparison to NULL" from checkpatch.pl. Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: panel: panel.c: Fixed coding style issuesNayeemahmed Badebade1-21/+42
Fixed warnings reported by checkpatch.pl: - Block comments use a trailing */ on a separate line - Block comments use * on subsequent lines Signed-off-by: Nayeemahmed Badebade <itachi.opsrc@gmail.com> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31staging: panel: fix block comment usageAlex Wilson1-4/+8
Fixed two coding style warnings concerning multiline comments. Signed-off-by: Alex Wilson <alex.david.wilson@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-26Merge tag 'staging-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds1-39/+21
Pull staging driver updates from Greg KH: "Here's the big, really big, staging tree patches for 4.2-rc1. Loads of stuff in here, almost all just coding style fixes / churn, and a few new drivers as well, one of which I just disabled from the build a few minutes ago due to way too many build warnings. Other than the one "disable this driver" patch, all of these have been in linux-next for quite a while with no reported issues" * tag 'staging-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1163 commits) staging: wilc1000: disable driver due to build warnings Staging: rts5208: fix CHANGE_LINK_STATE value Staging: sm750fb: ddk750_swi2c.c: Insert spaces before parenthesis Staging: sm750fb: ddk750_swi2c.c: Place braces on correct lines Staging: sm750fb: ddk750_swi2c.c: Insert spaces around operators Staging: sm750fb: ddk750_swi2c.c: Replace spaces with tabs Staging: sm750fb: ddk750_swi2c.h: Shorten lines to under 80 characters Staging: sm750fb: ddk750_swi2c.h: Replace spaces with tabs Staging: sm750fb: modedb.h: Shorten lines to under 80 characters Staging: sm750fb: modedb.h: Replace spaces with tabs staging: comedi: addi_apci_3120: rename 'this_board' variables staging: comedi: addi_apci_1516: rename 'this_board' variables staging: comedi: ni_atmio: cleanup ni_getboardtype() staging: comedi: vmk80xx: sanity check context used to get the boardinfo staging: comedi: vmk80xx: rename 'boardinfo' variables staging: comedi: dt3000: rename 'this_board' variables staging: comedi: adv_pci_dio: rename 'this_board' variables staging: comedi: cb_pcidas64: rename 'thisboard' variables staging: comedi: cb_pcidas: rename 'thisboard' variables staging: comedi: me4000: rename 'thisboard' variables ...
2015-06-01staging: panel: use new parport device modelSudip Mukherjee1-5/+9
Converted to use the new device-model parallel port. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31staging: panel: use schedule_timeout_interruptible()Nicholas Mc Guire1-5/+3
API consolidation with coccinelle found: ./drivers/staging/panel/panel.c:782:2-18: consolidation with schedule_timeout_*() recommended This is a 1:1 conversion with respect to schedule_timeout() to the schedule_timeout_interruptible() helper only - so only an API consolidation to improve readability. The timeout was being passed as (ms * HZ + 999) / 1000 but that simply looks wrong - rather than "manual" converting to jiffies, msecs_to_jiffies which handles all corner-cases correctly, was used. Patch was compile tested with x86_64_defconfig + CONFIG_STAGING=y, CONFIG_PARPORT=m, CONFIG_PANEL=m Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24staging: panel: fix stackdumpSudip Mukherjee1-23/+21
if we load the module, unload and then again try to load the module, we will get a stackdump. In the module_exit function we are unregistering the device and releasing the parport. So when we reach the detach function parport is already null and the unregister_reboot_notifier() is never called. When we again try to load the module it again tries register_reboot_notifier() and gives us a stackdump as its earlier registration is still not removed. It was caused by the commit bb046fef9668 ('staging: panel: register reboot') Fix this by moving all the unregistering and releasing in the detach function, which should be the ideal case as the detach will be called if we try to unregister the driver or if the parport is removed. Fixes: bb046fef9668 ('staging: panel: register reboot') Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-30staging: panel: remove duplicate codeSudip Mukherjee1-14/+0
both the misc_deregister(), parport_release() and parport_unregister_device() is there in the module_exit function also. detach is called from parport_unregister_driver() and by the time detach executes misc_deregister(), parport_release() and parport_unregister_device() has already executed marking keypad_initialized and lcd.initialized as false. so this part of the code will never execute. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26staging: panel: fix lcd typeSudip Mukherjee1-6/+6
the lcd type as defined in the Kconfig is not matching in the code. as a result the rs, rw and en pins were getting interchanged. Kconfig defines the value of PANEL_LCD to be 1 if we select custom configuration but in the code LCD_TYPE_CUSTOM is defined as 5. my hardware is LCD_TYPE_CUSTOM, but the pins were assigned to it as pins of LCD_TYPE_OLD, and it was not working. Now values are corrected with referenece to the values defined in Kconfig and it is working. checked on JHD204A lcd with LCD_TYPE_CUSTOM configuration. Cc: <stable@vger.kernel.org> # 2.6.32+ Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20staging: panel: remove initialization checkSudip Mukherjee1-11/+0
no need to monitor init_in_progress now as keypad_send_key() can only be called after the timer is initialized. and timer is initialized from keypad_init() which is in the attach section and can only execute after the module has initialized. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20staging: panel: return register valueSudip Mukherjee1-3/+4
we were returning success even if the module failed to register. now we are returning the actual return value, success or error. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20staging: panel: register rebootSudip Mukherjee1-4/+3
we donot need the reboot notifier in module init section, as the notifier is used after lcd is initialized. so lets register for the reboot notifier only after we have successfully attached to the parallel port. and similarly unregister at detach. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06staging: panel: initialize lcd if lcd enabledSudip Mukherjee1-19/+22
initialiaze lcd parameters only if lcd is enabled. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06staging: panel: register driver after checking deviceSudip Mukherjee1-12/+6
register the driver only if lcd or keypad has been enabled and if both are disabled then just exit. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26staging: panel: replace init_timer by setup_timerAya Mahfouz1-3/+1
This patch replaces init_timer and the 2 step initialization of function and data by setup_timer to make the code more concise. The issue was discovered using the following coccinelle script: @@ expression ds, e1, e2; @@ -init_timer (&ds); +setup_timer (&ds, e1, e2); ... ( -ds.function = e1; ... -ds.data = e2; | -ds.data = e2; ... -ds.function = e1; ) Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28drivers/staging: use current->state helpersDavidlohr Bueso1-1/+1
Call __set_current_state() instead of assigning the new state directly. These interfaces also aid CONFIG_DEBUG_ATOMIC_SLEEP environments, keeping track of who changed the state. Signed-off-by: Davidlohr Bueso <dbueso@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-12staging: panel: Remove magic numbers in LCD commandsMariusz Gorski1-30/+66
Get rid of magic numbers in LCD commands and replace them with defined values, so that it's more obvious that the commands are doing. Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-12staging: panel: Remove unused variableMariusz Gorski1-6/+0
Remove lcd.left_shift because it is only written to at some places but never read from. Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02staging: panel: Move LCD-related state into struct lcdMariusz Gorski1-121/+134
Move more or less all LCD-related state into struct lcd in order to get better cohesion; use bool instead of int where it makes sense. Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02staging: panel: Remove more magic number comparisonMariusz Gorski1-10/+10
Use a defined value instead of magic number comparison for checking whether a module param value has been set. Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02staging: panel: Refactor LCD init codeMariusz Gorski1-141/+163
Rework lcd_init method to make it a little bit more clear about the precedence of the params, move LCD geometry and pins layout to the LCD struct and thus make the LCD-related module params effectively read-only. Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02staging: panel: Make two more module params read-onlyMariusz Gorski1-34/+37
Make keypad_type and lcd_type module params read-only. This step also starts making it more clear what is the precedence of device params coming from different sources (device profile, runtime module param values etc). Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02staging: panel: Start making module params read-onlyMariusz Gorski1-14/+21
Start decoupling module params from the actual device state, both for lcd and keypad, by keeping the params read-only and moving the device state to related structs. Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02staging: panel: Use defined value or checking module params stateMariusz Gorski1-43/+43
Avoid magic number and use a comparison with a defined value instead that checks whether module param has been set by the user to some value at loading time. Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02staging: panel: Remove magic numbersMariusz Gorski1-10/+12
Get rid of magic numbers indicating that the value of a module param is not set. Use a defined value instead. Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02staging: panel: Call init function directlyMariusz Gorski1-6/+1
Remove useless function and let the kernel call the actual init function directly. Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02staging: panel: Set default parport module param valueMariusz Gorski1-4/+1
Set default parport module param value to DEFAULT_PARPORT so that a if-block can be avoided. Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26staging: panel: Use better names for two defined valuesMariusz Gorski1-8/+8
Give DEFAULT_KEYPAD and DEFAULT_LCD defines better names, so that their meaning is emphasized. Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com> Acked-By: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26staging: panel: Reorder module parameter declarationsMariusz Gorski1-35/+38
Change the order of the module parameter declarations so that it matches the Kconfig order. Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com> Acked-By: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26staging: panel: Reorder DEFAULT_* values redefinesMariusz Gorski1-13/+13
Change the order of the DEFAULT_* values redefines so that it matches the Kconfig order. Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com> Acked-By: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26staging: panel: Reorder initial DEFAULT_* definesMariusz Gorski1-4/+4
Change the order of the initial DEFAULT_* defines so that it matches the Kconfig order. Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com> Acked-By: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05staging: panel: Fix single-open policy race conditionMariusz Gorski1-9/+10
Fix the implementation of a single-open policy for both devices (lcd and keypad) by using atomic_t instead of plain ints. Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03staging: panel: Remove outdated TODO taskMariusz Gorski1-1/+0
Remove Lindent task from TODO file as it's obsolete. Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>