mindboards/ev3dev-kernel — pull request #12 by dlech (2014-01-21 19:20:43+00:00)
Title: Merge @dlech's experimental branch. AKA: The biggest pull request ever!

@rhempel: I was going to try to clean this up and feed it to you in bite-size pieces, but maybe it would be better to merge the whole thing as is. Many of the links in the _Kernel Hackers Notebook_ that I just added to the wiki point to the master branch and the stuff is not there yet.

Here is kind of a roadmap of the changes:
* I still have ```.config``` and .version ignored. I have seen a feature in the kernel ```make help``` about saving a default config. Maybe this would be a better way to store the .config in the repo.
* ```arch/arm/kernel/fiq.c```: See the required reading on the [wiki](https://github.com/mindboards/ev3dev/wiki/EV3%20FIQ) for where this patch came from.
* ```arch/arm/mach-davinci/legoev3-board.c```: I got drastic here and deleted lots of unused stuff. I probably deleted a few things too many. One that comes to mind is the spi device for the flash memory where the standard LEGO firmware lives.
* ```arch/arm/mach-davinci/board-legoev3.h```: This is where pin mapping (for muxing) is defined.
* ``` arch/arm/mach-davinci/cp_intc.c```: Had to make a few tweaks to handle FIQs.
* ```arch/arm/mach-davinci/da850.c```: Got rid of LEGO specific stuff and added all GPIOs and other pins we need. Also changed IRQ priority and added timer stuff for FIQ.
* ```arch/arm/mach-davinci/include/mach/legoev3.h```: This file seems to be turning into something like lms2012.h.
* ``` arch/arm/mach-davinci/include/mach/legoev3-fiq.c```: I2C stuff is based on code from lsm2012 kernel, sound stuff is new/original.
* ``` arch/arm/mach-davinci/time.c```: This is a cleaned up version of what is in the lms2012 kernel.
* ```drivers/hwmon/ads79xx.c```: This was an experiment for interfacing with the ADC chip. It is not needed, but I think it would be OK to leave it in case anyone want to study/copy it.
* ```drivers/i2c/busses/i2c-legoev3.c```: The equivalent of d_iic.c, except that it uses the existing linux kernel i2c framework.
* ``` drivers/i2c/i2c-core.c```: Had to make a couple minor changes to the linux i2c framework to make it work with LEGOs implementation. (Mostly issues with the NXT Ultrasonic Sensor).
* ```drivers/legoev3/ev3_input_port.c```, ```drivers/legoev3/ev3_uart_sensor.c```, ``` drivers/legoev3/legoev3_ports.c```, ``` drivers/legoev3/legoev3_uart.c```, ``` drivers/legoev3/measure_sensor_class.c```, ```drivers/legoev3/touch_sensor_class.c```: Input port and sensor framework. Plan on adding output ports and motors to this.
* ```drivers/legoev3/ev3_touch_sensor.c```, ```drivers/legoev3/ms_light_array.c```, ```drivers/legoev3/nxt_i2c_sensor.c```, ```drivers/legoev3/nxt_touch_sensor.c```, ```drivers/legoev3/nxt_ultrasonic.c```: Individual sensor drivers.
* ```drivers/legoev3/legoev3_analog.c```: Equivalent of Device1 in d_analog.c in lms2012.
* ```drivers/legoev3/legoev3_bluetooth.c```: A start on bluetooth support. Provides slow clock and shutdown gpio to properly initialize the bluetooth chip. (Code was in board-da850-evm.c in lms2012).
* ```drivers/power/legoev3_battery.c```: Driver for monitoring battery. Uses existing linux power_supply class.
* ```drivers/pwm/ecap.c```: TI was doing some silly things here, so I cleaned it up. Provides PWM for bluetooth slow clock and 2 output ports.
* ```include/linux/legoev3```: See corresponding .c files for all of the .h files.
* ```include/linux/tty.h```: Adding an id for a tty line discipline for UART sensors. This is an arbitrary selection and is potentially dangerous if we move to a higher version and this number is taken. I think this is rather unlikely though.
* ```sound/pwm/legoev3.c```: Now using FIQ for much better sound quality. @fdetro is improving on the even more.

Well, the list was not as long as I thought!