Self-powered Attiny13 with 2N2222

ReverseEMF:
The Source pin goes where the Emitter pin is, the Gate where the Base is and the Drain where the Collector is --

If you connect the P channel mosfet that way does not the body diode always conduct? It's not better swap drain ans source?

Ciao, Ale.

EDIT: sorry, I should think more before post, you circuit is OK.