mirror of https://github.com/OpenIPC/firmware.git
ingenic: remove ingenic-motors-t31 package (#1178)
parent
5237fe7674
commit
627c66e26b
|
@ -108,9 +108,6 @@ BR2_PACKAGE_ATBM60XX=y
|
|||
BR2_PACKAGE_RTL8189FS_OPENIPC=y
|
||||
# BR2_PACKAGE_RTL8188EU is not set
|
||||
|
||||
# Motors
|
||||
BR2_PACKAGE_INGENIC_MOTORS_T31=y
|
||||
|
||||
# WIREGUARD
|
||||
BR2_PACKAGE_WIREGUARD_LINUX_COMPAT=y
|
||||
BR2_PACKAGE_WIREGUARD_TOOLS=y
|
||||
|
|
|
@ -37,7 +37,6 @@ source "$BR2_EXTERNAL_GENERAL_PATH/package/hisilicon-osdrv-serdes/Config.in"
|
|||
source "$BR2_EXTERNAL_GENERAL_PATH/package/hisilicon-osdrv1-sources/Config.in"
|
||||
source "$BR2_EXTERNAL_GENERAL_PATH/package/i2c-telemetry/Config.in"
|
||||
source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-libimp-control/Config.in"
|
||||
source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-motors-t31/Config.in"
|
||||
source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-opensdk/Config.in"
|
||||
source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-osdrv-t20/Config.in"
|
||||
source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-osdrv-t21/Config.in"
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
config BR2_PACKAGE_INGENIC_MOTORS_T31
|
||||
bool "ingenic-motors-t31"
|
||||
depends on BR2_LINUX_KERNEL
|
||||
help
|
||||
Motor driver for Ingenic T31 using TCU2.2.
|
||||
|
||||
comment "ingenic-motors-t31 needs a Linux kernel to be built"
|
||||
depends on !BR2_LINUX_KERNEL
|
|
@ -1,20 +0,0 @@
|
|||
################################################################################
|
||||
#
|
||||
# Ingenic Motors Driver
|
||||
#
|
||||
################################################################################
|
||||
|
||||
INGENIC_MOTORS_T31_LICENSE = GPL-2.0
|
||||
|
||||
define INGENIC_MOTORS_T31_EXTRACT_CMDS
|
||||
cp -av $(INGENIC_MOTORS_T31_PKGDIR)/src/* $(@D)/
|
||||
endef
|
||||
|
||||
INGENIC_MOTORS_T31_MODULE_MAKE_OPTS = \
|
||||
INSTALL_MOD_PATH=$(TARGET_DIR) \
|
||||
INSTALL_MOD_DIR=ingenic \
|
||||
KVER=$(LINUX_VERSION_PROBED) \
|
||||
KSRC=$(LINUX_DIR)
|
||||
|
||||
$(eval $(kernel-module))
|
||||
$(eval $(generic-package))
|
|
@ -1,36 +0,0 @@
|
|||
#CROSS_COMPILE ?= mips-linux-gnu-
|
||||
#KDIR := ${ISVP_ENV_KERNEL_DIR}
|
||||
|
||||
############################################################################
|
||||
|
||||
PWD:=$(shell pwd)
|
||||
INSTALL_DIR := $(PWD)/output
|
||||
|
||||
DEFS =
|
||||
|
||||
MOTORS_NAME := sample_motor
|
||||
|
||||
$(MOTORS_NAME)-objs := motor.o
|
||||
obj-m := $(MOTORS_NAME).o
|
||||
|
||||
|
||||
EXTRA_CFLAGS := $(DEFS)
|
||||
|
||||
all: modules install
|
||||
|
||||
modules: clean
|
||||
$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KDIR) M=$(shell pwd) modules -j8
|
||||
|
||||
strip:
|
||||
$(CROSS_COMPILE)strip $(INSTALL_DIR)/*.ko --strip-unneeded
|
||||
|
||||
install: modules
|
||||
mkdir -p $(INSTALL_DIR)
|
||||
chmod 777 $(INSTALL_DIR)
|
||||
cp *.ko $(INSTALL_DIR)
|
||||
|
||||
clean:
|
||||
@rm -rf *.o *~ .depend .*.cmd *.mod.c .tmp_versions *.ko *.symvers modules.order
|
||||
make -C $(KDIR) M=$(PWD) ARCH=$(ARCH) clean
|
||||
|
||||
.PHONY: modules clean
|
File diff suppressed because it is too large
Load Diff
|
@ -1,161 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2015 Ingenic Semiconductor Co.,Ltd
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef __MOTOR_H__
|
||||
#define __MOTOR_H__
|
||||
|
||||
#include <linux/wait.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <jz_proc.h>
|
||||
/*
|
||||
* HORIZONTAL is X axis and VERTICAL is Y axis;
|
||||
* while the Zero point is left-bottom, Origin point
|
||||
* is cross point of horizontal midpoint and vertical midpoint.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*#define PLATFORM_HAS_HORIZONTAL_MOTOR 1*/
|
||||
/*#define PLATFORM_HAS_VERTICAL_MOTOR 1*/
|
||||
|
||||
enum jz_motor_cnt {
|
||||
HORIZONTAL_MOTOR,
|
||||
VERTICAL_MOTOR,
|
||||
HAS_MOTOR_CNT,
|
||||
};
|
||||
|
||||
/* ioctl cmd */
|
||||
#define MOTOR_STOP 0x1
|
||||
#define MOTOR_RESET 0x2
|
||||
#define MOTOR_MOVE 0x3
|
||||
#define MOTOR_GET_STATUS 0x4
|
||||
#define MOTOR_SPEED 0x5
|
||||
#define MOTOR_GOBACK 0x6
|
||||
#define MOTOR_CRUISE 0x7
|
||||
#define MOTOR_GET_MAXSTEPS 0x8
|
||||
|
||||
/* motor speed */
|
||||
#define MOTOR_MAX_SPEED 900 /**< unit: beats per second */
|
||||
#define MOTOR_MIN_SPEED 100
|
||||
|
||||
enum motor_status {
|
||||
MOTOR_IS_STOP,
|
||||
MOTOR_IS_RUNNING,
|
||||
};
|
||||
|
||||
struct motor_message {
|
||||
int x;
|
||||
int y;
|
||||
enum motor_status status;
|
||||
int speed;
|
||||
unsigned int x_max_steps;
|
||||
unsigned int y_max_steps;
|
||||
};
|
||||
|
||||
struct motors_steps{
|
||||
int x;
|
||||
int y;
|
||||
};
|
||||
|
||||
struct motor_reset_data {
|
||||
unsigned int x_max_steps;
|
||||
unsigned int y_max_steps;
|
||||
unsigned int x_cur_step;
|
||||
unsigned int y_cur_step;
|
||||
};
|
||||
|
||||
enum motor_direction {
|
||||
MOTOR_MOVE_LEFT_DOWN = -1,
|
||||
MOTOR_MOVE_STOP,
|
||||
MOTOR_MOVE_RIGHT_UP,
|
||||
};
|
||||
|
||||
struct motor_platform_data {
|
||||
const char name[32];
|
||||
int motor_min_gpio;
|
||||
int motor_max_gpio;
|
||||
int motor_gpio_level;
|
||||
|
||||
int motor_st1_gpio;
|
||||
int motor_st2_gpio;
|
||||
int motor_st3_gpio;
|
||||
int motor_st4_gpio;
|
||||
};
|
||||
|
||||
enum motor_ops_state {
|
||||
MOTOR_OPS_NORMAL,
|
||||
MOTOR_OPS_CRUISE,
|
||||
MOTOR_OPS_RESET,
|
||||
MOTOR_OPS_STOP,
|
||||
};
|
||||
|
||||
struct motor_driver {
|
||||
struct motor_platform_data *pdata;
|
||||
int max_pos_irq;
|
||||
int min_pos_irq;
|
||||
int max_steps; /* It is right-top point when x is max and y is max.*/
|
||||
int cur_steps; /* It is left-bottom point when x is 0 and y is 0.*/
|
||||
int total_steps;
|
||||
char reset_min_pos;
|
||||
char reset_max_pos;
|
||||
enum motor_direction move_dir;
|
||||
enum motor_ops_state state;
|
||||
struct completion reset_completion;
|
||||
|
||||
struct timer_list min_timer;
|
||||
struct timer_list max_timer;
|
||||
/* debug parameters */
|
||||
unsigned int max_pos_irq_cnt;
|
||||
unsigned int min_pos_irq_cnt;
|
||||
};
|
||||
|
||||
struct motor_move {
|
||||
struct motors_steps one;
|
||||
short times;
|
||||
};
|
||||
|
||||
struct motor_device {
|
||||
struct platform_device *pdev;
|
||||
const struct mfd_cell *cell;
|
||||
struct device *dev;
|
||||
struct miscdevice misc_dev;
|
||||
struct motor_driver motors[HAS_MOTOR_CNT];
|
||||
char *skip_mode;
|
||||
unsigned int counter;
|
||||
struct completion stop_completion;
|
||||
unsigned int wait_stop;
|
||||
#ifdef CONFIG_SOC_T40
|
||||
struct ingenic_tcu_chn *tcu;
|
||||
#else
|
||||
struct jz_tcu_chn *tcu;
|
||||
#endif
|
||||
int tcu_speed;
|
||||
|
||||
struct mutex dev_mutex;
|
||||
spinlock_t slock;
|
||||
|
||||
enum motor_ops_state dev_state;
|
||||
struct motor_message msg;
|
||||
struct motor_move dst_move;
|
||||
struct motor_move cur_move;
|
||||
|
||||
int run_step_irq;
|
||||
int flag;
|
||||
|
||||
/* debug parameters */
|
||||
struct proc_dir_entry *proc;
|
||||
};
|
||||
|
||||
#endif // __MOTOR_H__
|
Loading…
Reference in New Issue