Loading .mailmap +3 −1 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ Rudolf Marek <R.Marek@sh.cvut.cz> Rui Saraiva <rmps@joel.ist.utl.pt> Sachin P Sant <ssant@in.ibm.com> Sam Ravnborg <sam@mars.ravnborg.org> Sascha Hauer <s.hauer@pengutronix.de> S.Çağlar Onur <caglar@pardus.org.tr> Simon Kelley <simon@thekelleys.org.uk> Stéphane Witzmann <stephane.witzmann@ubpmes.univ-bpclermont.fr> Loading @@ -100,6 +101,7 @@ Tejun Heo <htejun@gmail.com> Thomas Graf <tgraf@suug.ch> Tony Luck <tony.luck@intel.com> Tsuneo Yoshioka <Tsuneo.Yoshioka@f-secure.com> Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Uwe Kleine-König <ukl@pengutronix.de> Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Documentation/Changes +3 −1 Original line number Diff line number Diff line Loading @@ -33,10 +33,12 @@ o Gnu make 3.79.1 # make --version o binutils 2.12 # ld -v o util-linux 2.10o # fdformat --version o module-init-tools 0.9.10 # depmod -V o e2fsprogs 1.29 # tune2fs o e2fsprogs 1.41.4 # e2fsck -V o jfsutils 1.1.3 # fsck.jfs -V o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs o xfsprogs 2.6.0 # xfs_db -V o squashfs-tools 4.0 # mksquashfs -version o btrfs-progs 0.18 # btrfsck o pcmciautils 004 # pccardctl -V o quota-tools 3.09 # quota -V o PPP 2.4.0 # pppd --version Loading Documentation/CodingStyle +13 −5 Original line number Diff line number Diff line Loading @@ -483,17 +483,25 @@ values. To do the latter, you can stick the following in your .emacs file: (* (max steps 1) c-basic-offset))) (add-hook 'c-mode-common-hook (lambda () ;; Add kernel style (c-add-style "linux-tabs-only" '("linux" (c-offsets-alist (arglist-cont-nonempty c-lineup-gcc-asm-reg c-lineup-arglist-tabs-only)))))) (add-hook 'c-mode-hook (lambda () (let ((filename (buffer-file-name))) ;; Enable kernel mode for the appropriate files (when (and filename (string-match "~/src/linux-trees" filename)) (string-match (expand-file-name "~/src/linux-trees") filename)) (setq indent-tabs-mode t) (c-set-style "linux") (c-set-offset 'arglist-cont-nonempty '(c-lineup-gcc-asm-reg c-lineup-arglist-tabs-only)))))) (c-set-style "linux-tabs-only"))))) This will make emacs go better with the kernel coding style for C files below ~/src/linux-trees. Loading Documentation/DMA-API.txt +1 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ This document describes the DMA API. For a more gentle introduction phrased in terms of the pci_ equivalents (and actual examples) see DMA-mapping.txt Documentation/PCI/PCI-DMA-mapping.txt. This API is split into two pieces. Part I describes the API and the corresponding pci_ API. Part II describes the extensions to the API Loading Documentation/DocBook/uio-howto.tmpl +88 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,12 @@ GPL version 2. </abstract> <revhistory> <revision> <revnumber>0.7</revnumber> <date>2008-12-23</date> <authorinitials>hjk</authorinitials> <revremark>Added generic platform drivers and offset attribute.</revremark> </revision> <revision> <revnumber>0.6</revnumber> <date>2008-12-05</date> Loading Loading @@ -312,6 +318,16 @@ interested in translating it, please email me pointed to by addr. </para> </listitem> <listitem> <para> <filename>offset</filename>: The offset, in bytes, that has to be added to the pointer returned by <function>mmap()</function> to get to the actual device memory. This is important if the device's memory is not page aligned. Remember that pointers returned by <function>mmap()</function> are always page aligned, so it is good style to always add this offset. </para> </listitem> </itemizedlist> <para> Loading Loading @@ -594,6 +610,78 @@ framework to set up sysfs files for this region. Simply leave it alone. </para> </sect1> <sect1 id="using_uio_pdrv"> <title>Using uio_pdrv for platform devices</title> <para> In many cases, UIO drivers for platform devices can be handled in a generic way. In the same place where you define your <varname>struct platform_device</varname>, you simply also implement your interrupt handler and fill your <varname>struct uio_info</varname>. A pointer to this <varname>struct uio_info</varname> is then used as <varname>platform_data</varname> for your platform device. </para> <para> You also need to set up an array of <varname>struct resource</varname> containing addresses and sizes of your memory mappings. This information is passed to the driver using the <varname>.resource</varname> and <varname>.num_resources</varname> elements of <varname>struct platform_device</varname>. </para> <para> You now have to set the <varname>.name</varname> element of <varname>struct platform_device</varname> to <varname>"uio_pdrv"</varname> to use the generic UIO platform device driver. This driver will fill the <varname>mem[]</varname> array according to the resources given, and register the device. </para> <para> The advantage of this approach is that you only have to edit a file you need to edit anyway. You do not have to create an extra driver. </para> </sect1> <sect1 id="using_uio_pdrv_genirq"> <title>Using uio_pdrv_genirq for platform devices</title> <para> Especially in embedded devices, you frequently find chips where the irq pin is tied to its own dedicated interrupt line. In such cases, where you can be really sure the interrupt is not shared, we can take the concept of <varname>uio_pdrv</varname> one step further and use a generic interrupt handler. That's what <varname>uio_pdrv_genirq</varname> does. </para> <para> The setup for this driver is the same as described above for <varname>uio_pdrv</varname>, except that you do not implement an interrupt handler. The <varname>.handler</varname> element of <varname>struct uio_info</varname> must remain <varname>NULL</varname>. The <varname>.irq_flags</varname> element must not contain <varname>IRQF_SHARED</varname>. </para> <para> You will set the <varname>.name</varname> element of <varname>struct platform_device</varname> to <varname>"uio_pdrv_genirq"</varname> to use this driver. </para> <para> The generic interrupt handler of <varname>uio_pdrv_genirq</varname> will simply disable the interrupt line using <function>disable_irq_nosync()</function>. After doing its work, userspace can reenable the interrupt by writing 0x00000001 to the UIO device file. The driver already implements an <function>irq_control()</function> to make this possible, you must not implement your own. </para> <para> Using <varname>uio_pdrv_genirq</varname> not only saves a few lines of interrupt handler code. You also do not need to know anything about the chip's internal registers to create the kernel part of the driver. All you need to know is the irq number of the pin the chip is connected to. </para> </sect1> </chapter> <chapter id="userspace_driver" xreflabel="Writing a driver in user space"> Loading Loading
.mailmap +3 −1 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ Rudolf Marek <R.Marek@sh.cvut.cz> Rui Saraiva <rmps@joel.ist.utl.pt> Sachin P Sant <ssant@in.ibm.com> Sam Ravnborg <sam@mars.ravnborg.org> Sascha Hauer <s.hauer@pengutronix.de> S.Çağlar Onur <caglar@pardus.org.tr> Simon Kelley <simon@thekelleys.org.uk> Stéphane Witzmann <stephane.witzmann@ubpmes.univ-bpclermont.fr> Loading @@ -100,6 +101,7 @@ Tejun Heo <htejun@gmail.com> Thomas Graf <tgraf@suug.ch> Tony Luck <tony.luck@intel.com> Tsuneo Yoshioka <Tsuneo.Yoshioka@f-secure.com> Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Uwe Kleine-König <ukl@pengutronix.de> Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Documentation/Changes +3 −1 Original line number Diff line number Diff line Loading @@ -33,10 +33,12 @@ o Gnu make 3.79.1 # make --version o binutils 2.12 # ld -v o util-linux 2.10o # fdformat --version o module-init-tools 0.9.10 # depmod -V o e2fsprogs 1.29 # tune2fs o e2fsprogs 1.41.4 # e2fsck -V o jfsutils 1.1.3 # fsck.jfs -V o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs o xfsprogs 2.6.0 # xfs_db -V o squashfs-tools 4.0 # mksquashfs -version o btrfs-progs 0.18 # btrfsck o pcmciautils 004 # pccardctl -V o quota-tools 3.09 # quota -V o PPP 2.4.0 # pppd --version Loading
Documentation/CodingStyle +13 −5 Original line number Diff line number Diff line Loading @@ -483,17 +483,25 @@ values. To do the latter, you can stick the following in your .emacs file: (* (max steps 1) c-basic-offset))) (add-hook 'c-mode-common-hook (lambda () ;; Add kernel style (c-add-style "linux-tabs-only" '("linux" (c-offsets-alist (arglist-cont-nonempty c-lineup-gcc-asm-reg c-lineup-arglist-tabs-only)))))) (add-hook 'c-mode-hook (lambda () (let ((filename (buffer-file-name))) ;; Enable kernel mode for the appropriate files (when (and filename (string-match "~/src/linux-trees" filename)) (string-match (expand-file-name "~/src/linux-trees") filename)) (setq indent-tabs-mode t) (c-set-style "linux") (c-set-offset 'arglist-cont-nonempty '(c-lineup-gcc-asm-reg c-lineup-arglist-tabs-only)))))) (c-set-style "linux-tabs-only"))))) This will make emacs go better with the kernel coding style for C files below ~/src/linux-trees. Loading
Documentation/DMA-API.txt +1 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ This document describes the DMA API. For a more gentle introduction phrased in terms of the pci_ equivalents (and actual examples) see DMA-mapping.txt Documentation/PCI/PCI-DMA-mapping.txt. This API is split into two pieces. Part I describes the API and the corresponding pci_ API. Part II describes the extensions to the API Loading
Documentation/DocBook/uio-howto.tmpl +88 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,12 @@ GPL version 2. </abstract> <revhistory> <revision> <revnumber>0.7</revnumber> <date>2008-12-23</date> <authorinitials>hjk</authorinitials> <revremark>Added generic platform drivers and offset attribute.</revremark> </revision> <revision> <revnumber>0.6</revnumber> <date>2008-12-05</date> Loading Loading @@ -312,6 +318,16 @@ interested in translating it, please email me pointed to by addr. </para> </listitem> <listitem> <para> <filename>offset</filename>: The offset, in bytes, that has to be added to the pointer returned by <function>mmap()</function> to get to the actual device memory. This is important if the device's memory is not page aligned. Remember that pointers returned by <function>mmap()</function> are always page aligned, so it is good style to always add this offset. </para> </listitem> </itemizedlist> <para> Loading Loading @@ -594,6 +610,78 @@ framework to set up sysfs files for this region. Simply leave it alone. </para> </sect1> <sect1 id="using_uio_pdrv"> <title>Using uio_pdrv for platform devices</title> <para> In many cases, UIO drivers for platform devices can be handled in a generic way. In the same place where you define your <varname>struct platform_device</varname>, you simply also implement your interrupt handler and fill your <varname>struct uio_info</varname>. A pointer to this <varname>struct uio_info</varname> is then used as <varname>platform_data</varname> for your platform device. </para> <para> You also need to set up an array of <varname>struct resource</varname> containing addresses and sizes of your memory mappings. This information is passed to the driver using the <varname>.resource</varname> and <varname>.num_resources</varname> elements of <varname>struct platform_device</varname>. </para> <para> You now have to set the <varname>.name</varname> element of <varname>struct platform_device</varname> to <varname>"uio_pdrv"</varname> to use the generic UIO platform device driver. This driver will fill the <varname>mem[]</varname> array according to the resources given, and register the device. </para> <para> The advantage of this approach is that you only have to edit a file you need to edit anyway. You do not have to create an extra driver. </para> </sect1> <sect1 id="using_uio_pdrv_genirq"> <title>Using uio_pdrv_genirq for platform devices</title> <para> Especially in embedded devices, you frequently find chips where the irq pin is tied to its own dedicated interrupt line. In such cases, where you can be really sure the interrupt is not shared, we can take the concept of <varname>uio_pdrv</varname> one step further and use a generic interrupt handler. That's what <varname>uio_pdrv_genirq</varname> does. </para> <para> The setup for this driver is the same as described above for <varname>uio_pdrv</varname>, except that you do not implement an interrupt handler. The <varname>.handler</varname> element of <varname>struct uio_info</varname> must remain <varname>NULL</varname>. The <varname>.irq_flags</varname> element must not contain <varname>IRQF_SHARED</varname>. </para> <para> You will set the <varname>.name</varname> element of <varname>struct platform_device</varname> to <varname>"uio_pdrv_genirq"</varname> to use this driver. </para> <para> The generic interrupt handler of <varname>uio_pdrv_genirq</varname> will simply disable the interrupt line using <function>disable_irq_nosync()</function>. After doing its work, userspace can reenable the interrupt by writing 0x00000001 to the UIO device file. The driver already implements an <function>irq_control()</function> to make this possible, you must not implement your own. </para> <para> Using <varname>uio_pdrv_genirq</varname> not only saves a few lines of interrupt handler code. You also do not need to know anything about the chip's internal registers to create the kernel part of the driver. All you need to know is the irq number of the pin the chip is connected to. </para> </sect1> </chapter> <chapter id="userspace_driver" xreflabel="Writing a driver in user space"> Loading