Lightly roast all the ingrdients 'to grind' except coconut. At the end add coconut and remove from heat. Cool and grind to a smooth paste adding 1-2 tbsp of water.
Slit the brinjals into 4 without removing the stalk. Stuff with the ground masala and set aside.
Heat oil in a kadai and add mustard seeds. Once it splutters, add split urad dal, asafoetida, curry leaves and fry till dal turn golden.
Add garlic, onion and fry till it's translucent and raw smell of garlic goes. Add the tomatoes and cook till they are mushy.
Add turmeric powder, red chilly powder, remaining masala if any salt and fry for 4-5 minutes. Add the brinjal and toss to coat them with masala,
Turn the heat to low and cover and cook till the brinjals are soft, turning them every 2-3 minutes.
Once the brinjals are tender, cook uncovered till the masala becomes dry. Adjust the salt as required.