Re: [PATCH 2/8] samples: move auxdisplay example code from Documentation
On 09/19/2016 10:05 AM, Jonathan Corbet wrote: > On Mon, 19 Sep 2016 08:47:33 -0600 > Shuah Khanwrote: > >> Move auxdisplay examples to samples and remove it from Documentation >> Makefile. Create a new Makefile to build auxdisplay. It can be built >> from top level directory or from auxdisplay directory: > > Documentation/auxdisplay/cfag12864b needs to be updated to reflect the new > home for the program (which probably does belong in samples/). > > I wonder if these programs need MAINTAINERS entries too? > > jon > I will make sure Documentation and MAINTAINERS update happens in v2 patch for this change. thanks, -- Shuah
Re: [PATCH 2/8] samples: move auxdisplay example code from Documentation
On 09/19/2016 10:05 AM, Jonathan Corbet wrote: > On Mon, 19 Sep 2016 08:47:33 -0600 > Shuah Khan wrote: > >> Move auxdisplay examples to samples and remove it from Documentation >> Makefile. Create a new Makefile to build auxdisplay. It can be built >> from top level directory or from auxdisplay directory: > > Documentation/auxdisplay/cfag12864b needs to be updated to reflect the new > home for the program (which probably does belong in samples/). > > I wonder if these programs need MAINTAINERS entries too? > > jon > I will make sure Documentation and MAINTAINERS update happens in v2 patch for this change. thanks, -- Shuah
Re: [PATCH 2/8] samples: move auxdisplay example code from Documentation
On Mon, 19 Sep 2016 08:47:33 -0600 Shuah Khanwrote: > Move auxdisplay examples to samples and remove it from Documentation > Makefile. Create a new Makefile to build auxdisplay. It can be built > from top level directory or from auxdisplay directory: Documentation/auxdisplay/cfag12864b needs to be updated to reflect the new home for the program (which probably does belong in samples/). I wonder if these programs need MAINTAINERS entries too? jon
Re: [PATCH 2/8] samples: move auxdisplay example code from Documentation
On Mon, 19 Sep 2016 08:47:33 -0600 Shuah Khan wrote: > Move auxdisplay examples to samples and remove it from Documentation > Makefile. Create a new Makefile to build auxdisplay. It can be built > from top level directory or from auxdisplay directory: Documentation/auxdisplay/cfag12864b needs to be updated to reflect the new home for the program (which probably does belong in samples/). I wonder if these programs need MAINTAINERS entries too? jon
[PATCH 2/8] samples: move auxdisplay example code from Documentation
Move auxdisplay examples to samples and remove it from Documentation Makefile. Create a new Makefile to build auxdisplay. It can be built from top level directory or from auxdisplay directory: Run make -C samples/auxdisplay or cd samples/auxdisplay; make Signed-off-by: Shuah Khan--- Documentation/Makefile| 3 +- Documentation/auxdisplay/.gitignore | 1 - Documentation/auxdisplay/Makefile | 7 - Documentation/auxdisplay/cfag12864b-example.c | 281 -- samples/auxdisplay/.gitignore | 1 + samples/auxdisplay/Makefile | 9 + samples/auxdisplay/cfag12864b-example.c | 281 ++ 7 files changed, 292 insertions(+), 291 deletions(-) delete mode 100644 Documentation/auxdisplay/.gitignore delete mode 100644 Documentation/auxdisplay/Makefile delete mode 100644 Documentation/auxdisplay/cfag12864b-example.c create mode 100644 samples/auxdisplay/.gitignore create mode 100644 samples/auxdisplay/Makefile create mode 100644 samples/auxdisplay/cfag12864b-example.c diff --git a/Documentation/Makefile b/Documentation/Makefile index 58c6629..60ec0dc 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -1,2 +1 @@ -subdir-y := auxdisplay blackfin \ - laptops mic misc-devices pcmcia timers watchdog +subdir-y := blackfin laptops mic misc-devices pcmcia timers watchdog diff --git a/Documentation/auxdisplay/.gitignore b/Documentation/auxdisplay/.gitignore deleted file mode 100644 index 7af2228..000 --- a/Documentation/auxdisplay/.gitignore +++ /dev/null @@ -1 +0,0 @@ -cfag12864b-example diff --git a/Documentation/auxdisplay/Makefile b/Documentation/auxdisplay/Makefile deleted file mode 100644 index ada4dac..000 --- a/Documentation/auxdisplay/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# List of programs to build -hostprogs-y := cfag12864b-example - -# Tell kbuild to always build the programs -always := $(hostprogs-y) - -HOSTCFLAGS_cfag12864b-example.o += -I$(objtree)/usr/include diff --git a/Documentation/auxdisplay/cfag12864b-example.c b/Documentation/auxdisplay/cfag12864b-example.c deleted file mode 100644 index e7823ff..000 --- a/Documentation/auxdisplay/cfag12864b-example.c +++ /dev/null @@ -1,281 +0,0 @@ -/* - *Filename: cfag12864b-example.c - * Version: 0.1.0 - * Description: cfag12864b LCD userspace example program - * License: GPLv2 - * - * Author: Copyright (C) Miguel Ojeda Sandonis - *Date: 2006-10-31 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -/* - * - * start of cfag12864b code - * - */ - -#include -#include -#include -#include -#include -#include - -#define CFAG12864B_WIDTH (128) -#define CFAG12864B_HEIGHT (64) -#define CFAG12864B_SIZE(128 * 64 / 8) -#define CFAG12864B_BPB (8) -#define CFAG12864B_ADDRESS(x, y) ((y) * CFAG12864B_WIDTH / \ - CFAG12864B_BPB + (x) / CFAG12864B_BPB) -#define CFAG12864B_BIT(n) (((unsigned char) 1) << (n)) - -#undef CFAG12864B_DOCHECK -#ifdef CFAG12864B_DOCHECK - #define CFAG12864B_CHECK(x, y) ((x) < CFAG12864B_WIDTH && \ - (y) < CFAG12864B_HEIGHT) -#else - #define CFAG12864B_CHECK(x, y) (1) -#endif - -int cfag12864b_fd; -unsigned char * cfag12864b_mem; -unsigned char cfag12864b_buffer[CFAG12864B_SIZE]; - -/* - * init a cfag12864b framebuffer device - * - * No error: return = 0 - * Unable to open: return = -1 - * Unable to mmap: return = -2 - */ -static int cfag12864b_init(char *path) -{ - cfag12864b_fd = open(path, O_RDWR); - if (cfag12864b_fd == -1) - return -1; - - cfag12864b_mem = mmap(0, CFAG12864B_SIZE, PROT_READ | PROT_WRITE, - MAP_SHARED, cfag12864b_fd, 0); - if (cfag12864b_mem == MAP_FAILED) { - close(cfag12864b_fd); - return -2; - } - - return 0; -} - -/* - * exit a cfag12864b framebuffer device - */ -static void cfag12864b_exit(void) -{ - munmap(cfag12864b_mem, CFAG12864B_SIZE); - close(cfag12864b_fd); -} - -/* - * set (x, y) pixel - */ -static void
[PATCH 2/8] samples: move auxdisplay example code from Documentation
Move auxdisplay examples to samples and remove it from Documentation Makefile. Create a new Makefile to build auxdisplay. It can be built from top level directory or from auxdisplay directory: Run make -C samples/auxdisplay or cd samples/auxdisplay; make Signed-off-by: Shuah Khan --- Documentation/Makefile| 3 +- Documentation/auxdisplay/.gitignore | 1 - Documentation/auxdisplay/Makefile | 7 - Documentation/auxdisplay/cfag12864b-example.c | 281 -- samples/auxdisplay/.gitignore | 1 + samples/auxdisplay/Makefile | 9 + samples/auxdisplay/cfag12864b-example.c | 281 ++ 7 files changed, 292 insertions(+), 291 deletions(-) delete mode 100644 Documentation/auxdisplay/.gitignore delete mode 100644 Documentation/auxdisplay/Makefile delete mode 100644 Documentation/auxdisplay/cfag12864b-example.c create mode 100644 samples/auxdisplay/.gitignore create mode 100644 samples/auxdisplay/Makefile create mode 100644 samples/auxdisplay/cfag12864b-example.c diff --git a/Documentation/Makefile b/Documentation/Makefile index 58c6629..60ec0dc 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -1,2 +1 @@ -subdir-y := auxdisplay blackfin \ - laptops mic misc-devices pcmcia timers watchdog +subdir-y := blackfin laptops mic misc-devices pcmcia timers watchdog diff --git a/Documentation/auxdisplay/.gitignore b/Documentation/auxdisplay/.gitignore deleted file mode 100644 index 7af2228..000 --- a/Documentation/auxdisplay/.gitignore +++ /dev/null @@ -1 +0,0 @@ -cfag12864b-example diff --git a/Documentation/auxdisplay/Makefile b/Documentation/auxdisplay/Makefile deleted file mode 100644 index ada4dac..000 --- a/Documentation/auxdisplay/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# List of programs to build -hostprogs-y := cfag12864b-example - -# Tell kbuild to always build the programs -always := $(hostprogs-y) - -HOSTCFLAGS_cfag12864b-example.o += -I$(objtree)/usr/include diff --git a/Documentation/auxdisplay/cfag12864b-example.c b/Documentation/auxdisplay/cfag12864b-example.c deleted file mode 100644 index e7823ff..000 --- a/Documentation/auxdisplay/cfag12864b-example.c +++ /dev/null @@ -1,281 +0,0 @@ -/* - *Filename: cfag12864b-example.c - * Version: 0.1.0 - * Description: cfag12864b LCD userspace example program - * License: GPLv2 - * - * Author: Copyright (C) Miguel Ojeda Sandonis - *Date: 2006-10-31 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -/* - * - * start of cfag12864b code - * - */ - -#include -#include -#include -#include -#include -#include - -#define CFAG12864B_WIDTH (128) -#define CFAG12864B_HEIGHT (64) -#define CFAG12864B_SIZE(128 * 64 / 8) -#define CFAG12864B_BPB (8) -#define CFAG12864B_ADDRESS(x, y) ((y) * CFAG12864B_WIDTH / \ - CFAG12864B_BPB + (x) / CFAG12864B_BPB) -#define CFAG12864B_BIT(n) (((unsigned char) 1) << (n)) - -#undef CFAG12864B_DOCHECK -#ifdef CFAG12864B_DOCHECK - #define CFAG12864B_CHECK(x, y) ((x) < CFAG12864B_WIDTH && \ - (y) < CFAG12864B_HEIGHT) -#else - #define CFAG12864B_CHECK(x, y) (1) -#endif - -int cfag12864b_fd; -unsigned char * cfag12864b_mem; -unsigned char cfag12864b_buffer[CFAG12864B_SIZE]; - -/* - * init a cfag12864b framebuffer device - * - * No error: return = 0 - * Unable to open: return = -1 - * Unable to mmap: return = -2 - */ -static int cfag12864b_init(char *path) -{ - cfag12864b_fd = open(path, O_RDWR); - if (cfag12864b_fd == -1) - return -1; - - cfag12864b_mem = mmap(0, CFAG12864B_SIZE, PROT_READ | PROT_WRITE, - MAP_SHARED, cfag12864b_fd, 0); - if (cfag12864b_mem == MAP_FAILED) { - close(cfag12864b_fd); - return -2; - } - - return 0; -} - -/* - * exit a cfag12864b framebuffer device - */ -static void cfag12864b_exit(void) -{ - munmap(cfag12864b_mem, CFAG12864B_SIZE); - close(cfag12864b_fd); -} - -/* - * set (x, y) pixel - */ -static void cfag12864b_set(unsigned char x,