aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-parport-light.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-10-28i2c: i2c-smbus: Use threaded irq for smbalertPhil Reid1-1/+0
Prior to this commit the smbalert_irq was handling in the hard irq context. This change switch to using a thread irq which avoids the need for the work thread. Using threaded irq also removes the need for the edge_triggered flag as the enabling / disabling of the hard irq for level triggered interrupts will be handled by the irq core. Without this change have an irq connected to something like an i2c gpio resulted in a null ptr deferences. Specifically handle_nested_irq calls the threaded irq handler. There are currently 3 in tree drivers affected by this change. i2c-parport driver calls i2c_handle_smbus_alert in a hard irq context. This driver use edge trigger interrupts which skip the enable / disable calls. But it still need to handle the smbus transaction on a thread. So the work thread is kept for this driver. i2c-parport-light & i2c-thunderx-pcidrv provide the irq number in the setup which will result in the thread irq being used. i2c-parport-light is edge trigger so the enable / disable call was skipped as well. i2c-thunderx-pcidrv is getting the edge / level trigger setting from of data and was setting the flag as required. However the irq core should handle this automatically. Signed-off-by: Phil Reid <preid@electromag.com.au> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2017-04-20Annotate hardware config module parameters in drivers/i2c/David Howells1-2/+2
When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/i2c/. Suggested-by: Alan Cox <gnomes@lxorguk.ukuu.org.uk> Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Jean Delvare <jdelvare@suse.de> cc: linux-i2c@vger.kernel.org
2014-12-14Merge tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-coreLinus Torvalds1-1/+0
Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
2014-11-07i2c: remove FSF addressWolfram Sang1-4/+0
We have a central copy of the GPL for that. Some addresses were already outdated. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2014-10-20i2c: busses: drop owner assignment from platform_driversWolfram Sang1-1/+0
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-29Update Jean Delvare's e-mail addressJean Delvare1-2/+2
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-12-22i2c: remove __dev* attributes from subsystemBill Pemberton1-3/+3
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Acked-by: Peter Korsgaard <peter.korsgaard@barco.com> (for ocores and mux-gpio) Acked-by: Havard Skinnemoen <hskinnemoen@gmail.com> (for i2c-gpio) Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn> (for puf3) Acked-by: Barry Song <baohua.song@csr.com> (for sirf) Reviewed-by: Jean Delvare <khali@linux-fr.org> [wsa: Fixed "foo* bar" flaws while we are here] Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2011-05-24i2c-parport: Various cleanupsJean Delvare1-5/+5
* Fix white space. * Rename labels to something meaningful. * Prefix defines with PORT_ to avoid collision with macros from <linux/parport.h>. * Add const markers where possible. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-05-21i2c: Use <linux/io.h> instead of <asm/io.h>H Hartley Sweeten1-1/+1
As warned by checkpatch.pl, <linux/io.h> should be used instead of <asm/io.h>. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-02i2c-parport-light: Add SMBus alert supportJean Delvare1-3/+39
Add support for the SMBus alert mechanism to the i2c-parport-light driver. The ADM1032 evaluation board at least is properly wired for this. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Trent Piepho <tpiepho@freescale.com>
2010-03-02i2c-parport: Give powered devices some time to settleJean Delvare1-1/+5
When the i2c-parport adapter is reponsible for powering devices, it would seem reasonable to give them some time to settle before trying to access them. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-01-26i2c: Delete many unused adapter IDsJean Delvare1-1/+0
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-14i2c-parport-light: Don't register a platform device resourceJean Delvare1-31/+8
The i2c-parport-light driver isn't a real platform driver, so it should not instantiate platform devices with resources. The resource management system can't cope with colliding resources, and we are likely to create such a colliding resource. So, better just try to grab the I/O ports we need right at module initialization time, and bail out if we can't. It has the added benefit that the module will no longer load if it isn't going to work, which is definitely more user-friendly. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-10-19Convert files to UTF-8 and some cleanupsJan Engelhardt1-1/+1
* Convert files to UTF-8. * Also correct some people's names (one example is Eißfeldt, which was found in a source file. Given that the author used an ß at all in a source file indicates that the real name has in fact a 'ß' and not an 'ss', which is commonly used as a substitute for 'ß' when limited to 7bit.) * Correct town names (Goettingen -> Göttingen) * Update Eberhard Mönkeberg's address (http://lkml.org/lkml/2007/1/8/313) Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-05-01i2c-parport-light: Port to the new device driver modelJean Delvare1-27/+117
Also fix a small race on driver unload: we need to unregister the i2c adapter before we power it off. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-10i2c: Discard the i2c algo del_bus wrappersJean Delvare1-1/+1
They are all only calling i2c_del_adapter, so we may as well do it directly. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-09-26i2c-algo-bit: Discard the mdelay data struct memberJean Delvare1-1/+0
i2c-algo-bit: Discard the mdelay data struct member The i2c_algo_bit_data structure has an mdelay member, which is not used by the algorithm code (the code has always been ifdef'd out.) Let's discard it to save some code and memory. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Cc: Adrian Bunk <bunk@stusta.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14[PATCH] i2c-parport: Make type parameter mandatoryMark M. Hoffman1-2/+7
This patch forces the user to specify what type of adapter is present when loading i2c-parport or i2c-parport-light. If none is specified, the driver init simply fails - instead of assuming adapter type 0. This alleviates the sometimes lengthy boot time delays which can be caused by accidentally building one of these into a kernel along with several i2c slave drivers that have lengthy probe routines (e.g. hwmon drivers). Kconfig and documentation updated accordingly. Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-06[PATCH] i2c: Use ARRAY_SIZE macroTobias Klauser1-6/+3
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]). Some trailing whitespaces are also removed. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: drivers/i2c/*: #include <linux/config.h> cleanupAlexey Dobriyan1-1/+0
Files that don't use CONFIG_* stuff shouldn't include config.h Files that use CONFIG_* stuff should include config.h It's that simple. ;-) Signed-off-by: Alexey Dobriyan <adobriyan@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+175
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!