aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2012-03-27mtd: spear_smi: initialize writebufsizeArtem Bityutskiy1-0/+1
The writebufsize concept was introduce by commit "0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents the maximum amount of data the device writes to the media at a time. This is an important parameter for UBIFS which is used during recovery and which basically defines how big a corruption caused by a power cut can be. Set writebufsize to the flash page size because it is the maximum amount of data it writes at a time. Signed-off-by: Artem Bityutskiy <[email protected]> Acked-by: Stefan Roese <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: lart: initialize writebufsizeArtem Bityutskiy1-0/+1
The writebufsize concept was introduce by commit "0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents the maximum amount of data the device writes to the media at a time. This is an important parameter for UBIFS which is used during recovery and which basically defines how big a corruption caused by a power cut can be. Set writebufsize to 4 because this drivers writes at max 4 bytes at a time. Signed-off-by: Artem Bityutskiy <[email protected]> Cc: [email protected] [2.6.38+] Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: docg3: initialize writebufsizeArtem Bityutskiy1-1/+1
The writebufsize concept was introduce by commit "0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents the maximum amount of data the device writes to the media at a time. This is an important parameter for UBIFS which is used during recovery and which basically defines how big a corruption caused by a power cut can be. Set it to be equivalent to mtd->writesize because this is the maximum amount of data the driver writes at a time. Signed-off-by: Artem Bityutskiy <[email protected]> Acked-by: Robert Jarzmik <[email protected]> Cc: [email protected] [3.2+] Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: doc2001plus: initialize writebufsizeArtem Bityutskiy1-1/+1
The writebufsize concept was introduce by commit "0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents the maximum amount of data the device writes to the media at a time. This is an important parameter for UBIFS which is used during recovery and which basically defines how big a corruption caused by a power cut can be. Set it to be equivalent to mtd->writesize because this is the maximum amount of data the driver writes at a time. Signed-off-by: Artem Bityutskiy <[email protected]> Cc: [email protected] [2.6.38+] Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: doc2001: initialize writebufsizeArtem Bityutskiy1-1/+1
The writebufsize concept was introduce by commit "0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents the maximum amount of data the device writes to the media at a time. This is an important parameter for UBIFS which is used during recovery and which basically defines how big a corruption caused by a power cut can be. Set it to be equivalent to mtd->writesize because this is the maximum amount of data the driver writes at a time. Signed-off-by: Artem Bityutskiy <[email protected]> Cc: [email protected] [2.6.38+] Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: doc2000: initialize writebufsizeArtem Bityutskiy1-1/+1
The writebufsize concept was introduce by commit "0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents the maximum amount of data the device writes to the media at a time. This is an important parameter for UBIFS which is used during recovery and which basically defines how big a corruption caused by a power cut can be. Set it to be equivalent to mtd->writesize because this is the maximum amount of data the driver writes at a time. Signed-off-by: Artem Bityutskiy <[email protected]> Cc: [email protected] [2.6.38+] Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: block2mtd: initialize writebufsizeArtem Bityutskiy1-0/+1
The writebufsize concept was introduce by commit "0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents the maximum amount of data the device writes to the media at a time. This is an important parameter for UBIFS which is used during recovery and which basically defines how big a corruption caused by a power cut can be. However, we forgot to set this parameter for block2mtd. Set it to PAGE_SIZE because this is actually the amount of data we write at a time. Signed-off-by: Artem Bityutskiy <[email protected]> Acked-by: Joern Engel <[email protected]> Cc: [email protected] [2.6.38+] Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: docg4: fix printk() warningsDan Carpenter1-3/+1
Gcc complains here: drivers/mtd/nand/docg4.c: In function ‘probe_docg4’: drivers/mtd/nand/docg4.c:1277:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘resource_size_t’ [-Wformat] drivers/mtd/nand/docg4.c:1277:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘resource_size_t’ [-Wformat] We have a standard way of printing these using a format string extension. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Randy Dunlap <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: nand: gpmi: use correct member for checking NAND_BBT_USE_FLASHWolfram Sang1-1/+1
This has been moved from .options to .bbt_options meanwhile. So, it currently checks for something totally different (NAND_OWN_BUFFERS) and decides according to that. Artem Bityutskiy: the options were moved in a40f734 mtd: nand: consolidate redundant flash-based BBT flags Artem Bityutskiy: CCing -stable Signed-off-by: Wolfram Sang <[email protected]> Acked-by: Huang Shijie <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Cc: [email protected] [3.2+] Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: m25p80: set writebufsizeBrian Norris1-0/+1
Using UBI on m25p80 can give messages like: UBI error: io_init: bad write buffer size 0 for 1 min. I/O unit We need to initialize writebufsize; I think "page_size" is the correct "bufsize", although I'm not sure. Comments? Signed-off-by: Brian Norris <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Cc: [email protected] [2.6.38+] Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: mtdcore: remove unnecessary mtd->resume checkBrian Norris1-1/+1
We don't need to to check for mtd->resume before calling mtd_resume(). mtd_resume() should take care of that. Signed-off-by: Brian Norris <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: add leading underscore to all mtd functionsArtem Bityutskiy35-265/+266
This patch renames all MTD functions by adding a "_" prefix: mtd->erase -> mtd->_erase mtd->read_oob -> mtd->_read_oob ... The reason is that we are re-working the MTD API and from now on it is an error to use MTD function pointers directly - we have a corresponding API call for every pointer. By adding a leading "_" we achieve the following: 1. Make sure we convert every direct pointer users 2. A leading "_" suggests that this interface is internal and it becomes less likely that people will use them directly 3. Make sure all the out-of-tree modules stop compiling and the owners spot the big API change and amend them. Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: nand: add support for diskonchip G4 nand flash deviceMike Dunn3-0/+1399
This patch adds a driver for the M-Sys / Sandisk diskonchip G4 nand flash found in various smartphones and PDAs, among them the Palm Treo680, HTC Prophet and Wizard, Toshiba Portege G900, Asus P526, and O2 XDA Zinc. It was tested on the Treo 680, but should work generically. Since v3, this patch adds power management functions, a scan of the factory bad block table during initialization, several fixes, and more extensive testing. Also, the platform data header file, which only contained partitioning information, was removed. Command-line partitioning can be used, at least until an mtd parser is written for the saftl format with which these chips are shipped. Signed-off-by: Mike Dunn <[email protected]> Reviewed-by: Robert Jarzmik <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: minor coding style cleanup in mtdpart.cStefan Roese1-1/+1
Signed-off-by: Stefan Roese <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: convert drivers/mtd/* to use module_spi_driver()Axel Lin3-39/+3
This patch converts the drivers in drivers/mtd/* to use the module_spi_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: nand: move SCANLASTPAGE handling to the correct code blockBrian Norris1-6/+7
As nand_default_block_markbad() is becoming more complex, it helps to have code appear only in its relevant codepath(s). Here, the calculation of `ofs' based on NAND_BBT_SCANLASTPAGE is only useful on paths where we write bad block markers to OOB. We move the condition/calculation closer to the `write' operation and update the comment to more correctly describe the operation. The variable `wr_ofs' is also used to help isolate our calculation of the "write" offset from the usage of `ofs' to represent the eraseblock offset. This will become useful when we reorder operations in the next patch. This patch should make no functional change. Signed-off-by: Brian Norris <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: mtdoops: kill Kconfig usage instructionsBrian Norris1-3/+0
The mtdoops usage instructions found in Kconfig have been incorrect since: commit 2e386e4bac90554887e73d6f342e845185b33fc3 mtd: mtdoops: refactor as a kmsg_dumper mtdoops no longer uses a console. Now, if you build it into your kernel, you add something like the following to your command line to select partition X as your logging partition: mtdoops.mtddev=X Anyway, it seems better to leave the documentation out of Kconfig. Signed-off-by: Brian Norris <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: sa11x0: remove definitions and code left for documentation purposesRussell King - ARM Linux1-100/+0
/* * This is here for documentation purposes only - until these people * submit their machine types. It will be gone January 2005. */ It's now seven years after that date, so let's remove this. Signed-off-by: Russell King <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: sa11x0: Remove shutdown handlerRussell King - ARM Linux1-12/+0
Commit c4a9f88daf ([MTD] [NOR] fix ctrl-alt-del can't reboot for intel flash bug) interferes with this work-around, causing MTD to issue this warning: Flash device refused suspend due to active operation (state 0) The commit makes our work-around in the map driver unnecessary, so let's remove it. Signed-off-by: Russell King <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: spear_smi: release memory region during removeShiraz Hashim1-0/+4
Driver must cleanup all held resources during remove. It wasn't releasing requested memory region. Signed-off-by: Shiraz Hashim <[email protected]> Signed-off-by: Stefan Roese <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: ST SPEAr: Add SMI driver for serial NOR flashShiraz Hashim3-0/+1120
SPEAr platforms (spear3xx/spear6xx/spear13xx) provide SMI (Serial Memory Interface) controller to access serial NOR flash. SMI provides a simple interface for SPI/serial NOR flashes and has certain inbuilt commands and features to support these flashes easily. It also makes it possible to map an address range in order to directly access (read/write) the SNOR over address bus. This patch intends to provide serial nor driver support for spear platforms which are accessed through SMI. Signed-off-by: Shiraz Hashim <[email protected]> Signed-off-by: Viresh Kumar <[email protected]> Signed-off-by: Stefan Roese <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: nand: differentiate 1- vs. 2-byte writes when marking bad blocksBrian Norris1-4/+8
It seems that we have developed a bad-block-marking "feature" out of pure laziness: "We write two bytes per location, so we dont have to mess with 16 bit access." It's relatively simple to write a 1 byte at a time on x8 devices and 2 bytes at a time on x16 devices, so let's do it. Signed-off-by: Brian Norris <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: nand: fix SCAN2NDPAGE check for BBMBrian Norris1-17/+23
nand_block_bad() doesn't check the correct pages when NAND_BBT_SCAN2NDPAGE is enabled. It should scan both the OOB region of both the 1st and 2nd page of each block. Signed-off-by: Brian Norris <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: nand: erase block before marking badBrian Norris1-0/+11
Many NAND flash systems (especially those with MLC NAND) cannot be reliably written twice in a row. For instance, when marking a bad block, the block may already have data written to it, and so we should attempt to erase the block before writing a bad block marker to its OOB region. We can ignore erase failures, since the block may be bad such that it cannot be erased properly; we still attempt to write zeros to its spare area. Signed-off-by: Brian Norris <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: onenand: samsung: add missing iounmapJulia Lawall1-2/+2
Add missing iounmap in error handling code, in a case where the function already preforms iounmap on some other execution path. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e; statement S,S1; int ret; @@ e = \(ioremap\|ioremap_nocache\)(...) ... when != iounmap(e) if (<+...e...+>) S ... when any when != iounmap(e) *if (...) { ... when != iounmap(e) return ...; } ... when any iounmap(e); // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: mtdcore: Fix build warning when CONFIG_MTD_CHAR is not definedFabio Estevam1-1/+1
Fix the following build warning: drivers/mtd/mtdcore.c: In function ‘mtd_release’: drivers/mtd/mtdcore.c:110: warning: unused variable ‘mtd’ This happens when neither CONFIG_MTD_CHAR nor CONFIG_MTD_CHAR_MODULE are defined. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: mtdblock: call mtd_sync() only if opened for writeAlexander Stein2-2/+7
Because it is useless to call it if the device is opened in R/O mode, and also harmful: on CFI NOR flash it may block for long time waiting for erase operations to complete is another partition with a R/W file-system on this chip. Artem Bityutskiy: write commit message, amend the patch to match the latest tree (we use mtd_sync(), not mtd->sync() nowadays). Signed-off-by: Alexander Stein <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: pmc551: fix signedness bug in init_pmc551()Xi Wang1-2/+2
Since "length" is a u32, the error handling below didn't work when fixup_pmc551() returns -ENODEV. if ((length = fixup_pmc551(PCI_Device)) <= 0) This patch changes both the type of "length" and the return type of fixup_pmc551() to int. Signed-off-by: Xi Wang <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-03-27mtd: cfi: AMD/Fujitsu compatibles: add panic write supportIra W. Snyder1-0/+240
This allows the mtdoops driver to work on flash chips using the AMD/Fujitsu compatible command set. As the code comments note, the locks used throughout the normal code paths in the driver are ignored, so that the chance of writing out the kernel's last messages are maximized. Signed-off-by: Ira W. Snyder <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-03-26acer-wmi: add quirk table for video backlight vendor modeLee, Chun-Yi2-2/+31
There have some acer laptop have broken _BCM implemenation, the AML code wrote value to EC register but firmware didn't change brighenss. Fortunately, the brightness control works on those machines with vendor mode. So, add quirk table for video backlight vendor mode and unregister acpi video interface on those machines. Tested on Acer TravelMate 4750 Cc: Carlos Corbacho <[email protected]> Cc: Matthew Garrett <[email protected]> Cc: Dmitry Torokhov <[email protected]> Cc: Corentin Chary <[email protected]> Cc: Thomas Renninger <[email protected]> Signed-off-by: Lee, Chun-Yi <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2012-03-26i2c-algo-bit: Don't resched on clock stretchingJean Delvare1-1/+1
Clock stretching is not supposed to last long, so asking to be rescheduled while waiting for the clock line to be released by a slave makes little sense. Odds are that the clock line will long have been released when we run again, so we will have lost time and may even get an SMBus timeout because of this. So just busy-wait in that case. This also participates in the effort to make i2c-algo-bit usable in contexts that can't sleep. Signed-off-by: Jean Delvare <[email protected]> Cc: Ben Skeggs <[email protected]>
2012-03-26i2c: Update the FSF addressJean Delvare9-9/+18
Signed-off-by: Jean Delvare <[email protected]>
2012-03-26i2c: Convert drivers/i2c/muxes/* to use module_i2c_driver()Axel Lin2-24/+2
This patch converts the drivers in drivers/i2c/muxes/* to use the module_i2c_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <[email protected]> Acked-by: Wolfram Sang <[email protected]> Cc: Guenter Roeck <[email protected]> Cc: Michael Lawnick <[email protected]> Cc: Ben Dooks <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2012-03-26i2c-i801: Use usleep_range to wait for command completionJean Delvare1-12/+12
Use usleep_range instead of msleep when waiting for command completion. Most SMBus commands complete in less than 2 jiffies so this brings a pleasant performance boost. Strongly inspired from a similar change by Olivier Sobrie to the i2c-isch driver. Signed-off-by: Jean Delvare <[email protected]> Cc: Olivier Sobrie <[email protected]>
2012-03-26i2c-i801: Add device IDs for Intel Lynx PointSeth Heasley2-0/+4
Add the SMBus controller device IDs for the Intel Lynx Point PCH. Signed-off-by: Seth Heasley <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2012-03-26i2c-isch: Decrease delay in command completion check loopOlivier Sobrie1-5/+5
Generally it is not needed to wait for 1 msec, the SMBus get often ready in less than 200 usecs. msleep(1) can wait up to 20 msecs... It has a significant impact when there is a burst of transactions on the bus. Signed-off-by: Olivier Sobrie <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2012-03-26i2c-gpio: Use linux/gpio.h rather than asm/gpio.hMark Brown1-2/+1
Direct inclusion of asm/gpio.h has been deprecated for a while now due to the cross platform gpiolib. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2012-03-26drivers/platform/x86/amilo-rfkill.c::amilo_rfkill_probe() avoid NULL derefJesper Juhl1-1/+4
In drivers/platform/x86/amilo-rfkill.c::amilo_rfkill_probe() the call to dmi_first_match() may fail and return NULL. If it does return NULL, then we'll be dereferencing a NULL pointer in the rfkill_alloc() call where we do 'system_id->driver_data' --> KABOOM! Avoid that problem by testing for a NULL return value from dmi_first_match() and bailing out if it fails. I was a bit uncertain about what to return in the failure case. In the end I settled for -ENXIO as the most logical error to return. Signed-off-by: Jesper Juhl <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2012-03-26samsung-laptop: unregister ACPI video module for some well known laptopsCorentin Chary1-4/+76
On these laptops, the ACPI video is not functional, and very unlikely to be fixed by the vendor. Note that intel_backlight works for some of these laptops, and the backlight from samsung-laptop always work. The good news is that newer laptops have functional ACPI video device and won't end up growing this list. Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2012-03-26acer-wmi: No wifi rfkill on Sony machinesLee, Chun-Yi1-0/+1
The wireless rfkill should charged by sony-laptop but not acer-wmi. So, add Sony's SNY5001 acpi device to blacklist in acer-wmi. Tested on Sony Vaio Cc: Carlos Corbacho <[email protected]> Cc: Matthew Garrett <[email protected]> Cc: Mattia Dongili <[email protected]> Cc: Dimitris N <[email protected]> Tested-by: Dimitris N <[email protected]> Signed-off-by: Lee, Chun-Yi <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2012-03-26thinkpad-acpi: recognize Lenovo as version string in newer V-series BIOSManoj Iyer1-1/+1
The newer V series bios reports product version as 'Lenovo' instead of 'ThinkPad'. Recoginze this new string so that the module can load. Signed-off-by: Manoj Iyer <[email protected]> Signed-off-by: Matthew Garrett <[email protected]> Tested-by: James Ferguson <[email protected]> Tested-by: Dennis Chua <[email protected]> Tested-by: Ike Pan <[email protected]> Acked-by: Henrique de Moraes Holschuh <[email protected]>
2012-03-26asus-wmi: don't update power and brightness when using scalarCorentin Chary1-7/+13
But we can still do it on other boards, as this might happen if the backlight driver change when update_bl is called. Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2012-03-26eeepc-wmi: split et2012 specific hacksCorentin Chary1-14/+20
Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2012-03-26eeepc-wmi: refine quirks handlingCorentin Chary1-5/+8
Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2012-03-26asus-nb-wmi: set panel_power correctlyCorentin Chary1-0/+2
Even if it's currently unused. Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2012-03-26asus-wmi: move WAPF variable into quirks_entryCorentin Chary4-5/+9
Some models work better with different values of wapf, so move the variable into quriks_entry to make it more easy to give a specific value to different models. Based on original patch from AceLan Kao <[email protected]> Cc: AceLan Kao <[email protected]> Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2012-03-26asus-wmi: store backlight power status for AIO machineAceLan Kao3-16/+34
Due to some implementation reasons, ASUS ET2012 All-in-One machines can't report the correct backlight power status, it will always return 1. To track the backlight power status correctly, we have to store the status by ourselves. BTW, by the BIOS design, the backlight power will be turn on/off sequently, no matter what the value of the parameter will be. More over, the brightness adjustment command will turn on the backlight power. Those behaviors will make us fail to track the backlight power status. For example, While we are trying to turn on the backlight power, we will send out the brightness adjustment command and then trying to figure out if we have to turn on the backlight power, then send out the command. But, the real case is that, the backlight power turns on while sending the brightness adjustment command, and then we send out the command to turn on the backlight power, it actually will turn off the backlight power and the backlight power status we recorded becomes wrong. So, we have to seperate these two commands by a if statement. Signed-off-by: AceLan Kao <[email protected]> Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2012-03-26asus-wmi: add scalar board brightness adj. supportAceLan Kao4-33/+97
Some ASUS ET2012E/I All-in-One machines that use a scalar board to control the brightness, and they only accept brightness up and down command. So, I introduced a get_scalar_command() function to pass the command to the scalar board through WMI. Besides, we have to store the brightness value locally, for we need the old value to know the brightness value is increasing or decreasing. BTW, since there is no way to retrieve the actual brightness(it would be a fixed value), and the max brightness value would be fixed to 1, so we have to keep passing the brightness up/down command when we reached the max brightness value or 0. Signed-off-by: AceLan Kao <[email protected]> Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2012-03-26samsung-laptop: cleanup return type: mode_t vs umode_tDan Carpenter1-1/+1
This function returns a umode_t (unsigned short) instead of mode_t which is an unsigned int on some architectures. Cleaning this up silences a compile warning: drivers/platform/x86/samsung-laptop.c:1108:2: warning: initialization from incompatible pointer type [enabled by default] Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2012-03-26drivers, samsung-laptop: fix usage of isalnumDavid Rientjes1-0/+1
linux/ctype.h is needed for isalnum() to avoid a build error: drivers/platform/x86/samsung-laptop.c: In function ‘samsung_sabi_diag’: drivers/platform/x86/samsung-laptop.c:1306: error: implicit declaration of function ‘isalnum’ Signed-off-by: David Rientjes <[email protected]> Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>