Gentoo Archives: gentoo-commits

From: Michael Weber <xmw@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/xmw:master commit in: dev-embedded/msp430-uart/files/, dev-embedded/msp430-uart/
Date: Tue, 08 Jul 2014 16:00:52
Message-Id: 1404835201.af846a4e98002a4fcd475bb1079b8a6e8440db4f.xmw@gentoo
1 commit: af846a4e98002a4fcd475bb1079b8a6e8440db4f
2 Author: Michael Weber <michael <AT> xmw <DOT> de>
3 AuthorDate: Tue Jul 8 16:00:01 2014 +0000
4 Commit: Michael Weber <xmw <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 8 16:00:01 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/xmw.git;a=commit;h=af846a4e
7
8 Revbump to address newer kernels
9
10 Package-Manager: portage-2.2.10
11 Manifest-Sign-Key:
12
13 ---
14 dev-embedded/msp430-uart/ChangeLog | 6 +++
15 .../files/msp430-uart-0-cdc-acm-3.4.10.patch | 33 ++++++++++++++++
16 dev-embedded/msp430-uart/msp430-uart-0-r1.ebuild | 44 ++++++++++++++++++++++
17 3 files changed, 83 insertions(+)
18
19 diff --git a/dev-embedded/msp430-uart/ChangeLog b/dev-embedded/msp430-uart/ChangeLog
20 index 142e3cb..898b950 100644
21 --- a/dev-embedded/msp430-uart/ChangeLog
22 +++ b/dev-embedded/msp430-uart/ChangeLog
23 @@ -1,3 +1,9 @@
24 +*msp430-uart-0-r1 (08 Jul 2014)
25 +
26 + 08 Jul 2014; Michael Weber <xmw@g.o>
27 + +files/msp430-uart-0-cdc-acm-3.4.10.patch, +msp430-uart-0-r1.ebuild:
28 + Revbump to address newer kernels
29 +
30 *msp430-uart-0 (06 Sep 2013)
31
32 06 Sep 2013; Michael Weber <xmw@g.o>
33
34 diff --git a/dev-embedded/msp430-uart/files/msp430-uart-0-cdc-acm-3.4.10.patch b/dev-embedded/msp430-uart/files/msp430-uart-0-cdc-acm-3.4.10.patch
35 new file mode 100644
36 index 0000000..f57824e
37 --- /dev/null
38 +++ b/dev-embedded/msp430-uart/files/msp430-uart-0-cdc-acm-3.4.10.patch
39 @@ -0,0 +1,33 @@
40 +From https://aur.archlinux.org/packages.php?ID=63769
41 +
42 +--- cdc-acm.c
43 ++++ cdc-acm.c
44 +@@ -532,11 +532,6 @@
45 + goto error_submit_urb;
46 + }
47 +
48 +- acm->ctrlout = ACM_CTRL_DTR | ACM_CTRL_RTS;
49 +- if (acm_set_control(acm, acm->ctrlout) < 0 &&
50 +- (acm->ctrl_caps & USB_CDC_CAP_LINE))
51 +- goto error_set_control;
52 +-
53 + usb_autopm_put_interface(acm->control);
54 +
55 + /*
56 +@@ -559,8 +554,6 @@
57 + usb_kill_urb(acm->read_urbs[i]);
58 + acm->ctrlout = 0;
59 + acm_set_control(acm, acm->ctrlout);
60 +-error_set_control:
61 +- usb_kill_urb(acm->ctrlurb);
62 + error_submit_urb:
63 + usb_autopm_put_interface(acm->control);
64 + error_get_interface:
65 +@@ -594,7 +587,6 @@
66 + mutex_lock(&acm->mutex);
67 + if (!acm->disconnected) {
68 + pm_err = usb_autopm_get_interface(acm->control);
69 +- acm_set_control(acm, acm->ctrlout = 0);
70 +
71 + for (;;) {
72 + urb = usb_get_from_anchor(&acm->delayed);
73
74 diff --git a/dev-embedded/msp430-uart/msp430-uart-0-r1.ebuild b/dev-embedded/msp430-uart/msp430-uart-0-r1.ebuild
75 new file mode 100644
76 index 0000000..be0c4eb
77 --- /dev/null
78 +++ b/dev-embedded/msp430-uart/msp430-uart-0-r1.ebuild
79 @@ -0,0 +1,44 @@
80 +# Copyright 1999-2014 Gentoo Foundation
81 +# Distributed under the terms of the GNU General Public License v2
82 +# $Header: $
83 +
84 +EAPI=5
85 +
86 +inherit linux-info linux-mod eutils
87 +
88 +DESCRIPTION="kernel module fix for the MSP430 LaunchPad UART"
89 +HOMEPAGE="https://aur.archlinux.org/packages.php?ID=63769"
90 +SRC_URI=""
91 +
92 +LICENSE="GPL-2"
93 +SLOT="0"
94 +KEYWORDS="~amd64"
95 +IUSE=""
96 +
97 +CONFIG_CHECK="~!USB_SERIAL_TI"
98 +ERROR_X86_ACPI_CPUFREQ="CONFIG_USB_SERIAL_TI has to be configured to Module to enable the replacement of cdc-acm with msp430-uart."
99 +MODULE_NAMES="${PN}(misc:)"
100 +BUILD_TARGETS="module"
101 +
102 +DEPEND=""
103 +RDEPEND=""
104 +
105 +S=${WORKDIR}
106 +
107 +src_unpack() {
108 + default
109 + cp -v "${KERNEL_DIR}"/drivers/usb/class/cdc-acm.{c,h} . || die
110 +}
111 +
112 +src_prepare() {
113 + if kernel_is ge 3 14 10 ; then
114 + epatch "${FILESDIR}"/${P}-cdc-acm-3.4.10.patch
115 + else
116 + epatch "${FILESDIR}"/${P}-cdc-acm.patch
117 + fi
118 + echo "obj-m := ${PN}.o" >> Makefile
119 + echo "module:" >> Makefile
120 + echo " \$(MAKE) -C "${KERNEL_DIR}" M="${S}" modules" >> Makefile
121 + mv cdc-acm.c ${PN}.c || die
122 + export KERNEL_DIR="${KERNEL_DIR}"
123 +}